Xellic Posted December 31, 2014 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?
Joseph Posted December 31, 2014 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
Xellic Posted December 31, 2014 Author Posted December 31, 2014 try: objects.closest(true, "Bank booth"); Works. Didn't realize it was so simple. Thanks a lot.
Novak Posted December 31, 2014 Posted December 31, 2014 yeah the default is not true distance, its the theory distance or whatever
Apaec Posted December 31, 2014 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
Czar Posted December 31, 2014 Posted December 31, 2014 Didn't even know about closest(true, "Object"), thanks 1
Joseph Posted January 1, 2015 Posted January 1, 2015 it doesnt work all the times but more of the time its does the boolean is the real distance.