Xellic Posted December 31, 2014 Share Posted December 31, 2014 If I have RS2Object bankBooth = objects.closest("Bank booth"); it will find the closest bank booth to me. Problem is, if I am already standing in front of a bank booth, it will find the closest one next to me instead of interacting with the one already in front of me. How do I make it so when the script initially finds a bank booth, it will keep using the same one? Link to comment Share on other sites More sharing options...
Joseph Posted December 31, 2014 Share Posted December 31, 2014 If I have RS2Object bankBooth = objects.closest("Bank booth"); it will find the closest bank booth to me. Problem is, if I am already standing in front of a bank booth, it will find the closest one next to me instead of interacting with the one already in front of me. How do I make it so when the script initially finds a bank booth, it will keep using the same one? try: objects.closest(true, "Bank booth"); 2 Link to comment Share on other sites More sharing options...
Xellic Posted December 31, 2014 Author Share Posted December 31, 2014 try: objects.closest(true, "Bank booth"); Works. Didn't realize it was so simple. Thanks a lot. Link to comment Share on other sites More sharing options...
Novak Posted December 31, 2014 Share Posted December 31, 2014 yeah the default is not true distance, its the theory distance or whatever Link to comment Share on other sites More sharing options...
Apaec Posted December 31, 2014 Share Posted December 31, 2014 If you always want the same one, despite it not being the closest, you could grab its id. So first define the bank booth, then get it's id, then interact with the id instead of the booth from then on? but If what josed said fixed it thank nice work Link to comment Share on other sites More sharing options...
Czar Posted December 31, 2014 Share Posted December 31, 2014 Didn't even know about closest(true, "Object"), thanks 1 Link to comment Share on other sites More sharing options...
Joseph Posted January 1, 2015 Share Posted January 1, 2015 it doesnt work all the times but more of the time its does the boolean is the real distance. Link to comment Share on other sites More sharing options...