Zero Posted May 30, 2015 Posted May 30, 2015 (edited) I'm calling a class.function from the main class like this, class name = new class(this); class.function(); Within this function for example I am, function (Script s) { s.log( Integer.toString( s.myPlayer.getHealth() ) ); } But for some reason it is returning the wrong value.Am I doing something wrong? Edited May 30, 2015 by Zero
Mysteryy Posted May 30, 2015 Posted May 30, 2015 Use Skills to get the correct value. (Skills.getDynamic I think, although its been a while and im not looking in the api.) I believe that what you are trying to do will only return the correct value if your in combat or something like that. 1
Zero Posted May 30, 2015 Author Posted May 30, 2015 Use Skills to get the correct value. (Skills.getDynamic I think, although its been a while and im not looking in the api.) I believe that what you are trying to do will only return the correct value if your in combat or something like that. I'll give that a try, thank you! It's hard to know this stuff when it isn't indicated in the docs. 1
FrostBug Posted May 31, 2015 Posted May 31, 2015 I'll give that a try, thank you! It's hard to know this stuff when it isn't indicated in the docs. It is, though.