June 27, 20169 yr Hi. So I'm wondering how to check if an object is performing an animation or not. I'm working on a Dwarf-multicannon but I have no idea how to check if the cannon is rotating or needs to be fired.. For Character's you could just use character.isAnimating() but RS2Objects don't have that check. Anyone have any ideas?
June 27, 20169 yr Hi. So I'm wondering how to check if an object is performing an animation or not. I'm working on a Dwarf-multicannon but I have no idea how to check if the cannon is rotating or needs to be fired.. For Character's you could just use character.isAnimating() but RS2Objects don't have that check. Anyone have any ideas? try checking its height or its model
June 27, 20169 yr Author try checking its height or its model Do you mean that I should save the model id for when the cannon is not rotating, and then compare it with the rotating one..? height shouldn't change lol
June 27, 20169 yr Do you mean that I should save the model id for when the cannon is not rotating, and then compare it with the rotating one..? height shouldn't change lol i'm not sure what actually changes in your situation, try checking if its height changes when its rotating and if its model id is different when rotating
June 27, 20169 yr Author i'm not sure what actually changes in your situation, try checking if its height changes when its rotating and if its model id is different when rotating Yeah gonna debug it and let you guys know, hold on
June 28, 20169 yr Author i'm not sure what actually changes in your situation, try checking if its height changes when its rotating and if its model id is different when rotating Ok I have no idea. The "Entity Debug Info" is identical when the cannon is and isn't rotating.. Edited June 28, 20169 yr by swiffy
June 28, 20169 yr There should be a config value that changes when the cannon is firing. Try config debug Additionally there will probably be a config storing how many cannonballs it has left EDIT: I don't have the config for cannon state on hand; but remaining cannonballs should be int cBalls = getConfigs().get(3); From that you could make the assumption that cannon is not firing if cBalls is 0 Edited June 28, 20169 yr by FrostBug
Create an account or sign in to comment