JagexPlease 0 Share Posted February 27, 2019 I can't seem to get the door gameObject, it just returns a null pointer exception. If I try and add the door as a passableObject it just doesn't seem to get it. Any ideas on how to get around this? Preferably in an elegant way. I guess I could walk to a specific spot, put the camera in a specific space and click the area of the door. But that feels a bit janky. Link to comment Share on other sites More sharing options...
Evil Bob 5 Share Posted February 27, 2019 2 hours ago, JagexPlease said: it just returns a null pointer exception It returns null, which can be checked so a null pointer exception doesn't get thrown. Show some code if you want to get help. Link to comment Share on other sites More sharing options...
JagexPlease 0 Author Share Posted February 27, 2019 Yeah I can check it, but that doesn't help actually interacting with the door itself. Meaning the bot just chills outside doing nothing. Link to comment Share on other sites More sharing options...
Evil Bob 5 Share Posted February 28, 2019 8 hours ago, JagexPlease said: Yeah I can check it, but that doesn't help actually interacting with the door itself. Meaning the bot just chills outside doing nothing. 8 hours ago, Evil Bob said: Show some code if you want to get help. Link to comment Share on other sites More sharing options...
NovaGTX 106 Share Posted March 1, 2019 Fill in the respective parameters for your application but this should work. GameObject Door = getGameObjects().closest(door -> door != null && door.getName().equalsIgnoreCase("DoorNameHere") && door.getTile().equals(new Tile(420, 6969))); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now