Mikee_ Posted December 22, 2016 Share Posted December 22, 2016 (edited) Well the color of the power up's text when you right click it is the same color as a GroundItem even through it appears to be an object... so at first I tried this if (getGroundItems().closest("Recurrent damage") != null) { state = 2; getGroundItems().closest("Recurrent damage").interact("Activate"); but that wasn't detecting or doing anything wasn't switching to state 2 at all then I tried as an object... if (getObjects().closest("Recurrent damage") != null) { state = 2; getObjects().closest("Recurrent damage").interact("Activate"); Ideas? Anyone know how to detect as just plain "Any Entity" ?? Or maybe I have the right idea, but I'm making some beginner mistake? Thanks in advance for help Edited December 22, 2016 by puremikeg943 Quote Link to comment Share on other sites More sharing options...
Hayase Posted December 22, 2016 Share Posted December 22, 2016 wasn't switching to state 2 at all That means the object is still null. You need to keep looking for the object by either walking around or something to try and find those objects. Quote Link to comment Share on other sites More sharing options...
Mikee_ Posted December 22, 2016 Author Share Posted December 22, 2016 That means the object is still null. You need to keep looking for the object by either walking around or something to try and find those objects. It isn't working even when the power ups appear next to me. That's why I was wondering if i could use "closest()" in a broad spectrum sense like instead of grounditem.closest() or object.closest() i could perhaps use entity.closest()... Quote Link to comment Share on other sites More sharing options...
Hayase Posted December 22, 2016 Share Posted December 22, 2016 If you use entity hover debug in the client what do you see about the object and it's id? Perhaps instead of calling it by the string name you can call it by the id instead? 1 Quote Link to comment Share on other sites More sharing options...
Mikee_ Posted December 22, 2016 Author Share Posted December 22, 2016 If you use entity hover debug in the client what do you see about the object and it's id? Perhaps instead of calling it by the string name you can call it by the id instead? Wowowowow.... I thought it was a ground item because of the orange color but it turns out the problem was that it is an object but Jagex just used a "<col=" code thing in the beginning of the name string... therefore it wasnt being detected as either because it's like an invisible part of the name... I also feel dumb for completely forgetting about the entity hover debug... 1 Quote Link to comment Share on other sites More sharing options...