swiffy Posted June 27, 2016 Share Posted June 27, 2016 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? Quote Link to comment Share on other sites More sharing options...
Eagle Scripts Posted June 27, 2016 Share Posted June 27, 2016 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 1 Quote Link to comment Share on other sites More sharing options...
swiffy Posted June 27, 2016 Author Share Posted June 27, 2016 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 Quote Link to comment Share on other sites More sharing options...
Eagle Scripts Posted June 27, 2016 Share Posted June 27, 2016 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 Quote Link to comment Share on other sites More sharing options...
swiffy Posted June 27, 2016 Author Share Posted June 27, 2016 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 Quote Link to comment Share on other sites More sharing options...
swiffy Posted June 28, 2016 Author Share Posted June 28, 2016 (edited) 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, 2016 by swiffy Quote Link to comment Share on other sites More sharing options...
FrostBug Posted June 28, 2016 Share Posted June 28, 2016 (edited) 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, 2016 by FrostBug 1 Quote Link to comment Share on other sites More sharing options...