Maybe this will be quite similar to above answers:
This will end the thread if the player got too far from the location
@EDIT: Epic fail, I forgot to put loop in the code if it was necessary.
Code:
if(Distance((horizontal axis, vertical axis, height), self.origin) <= 9000)
{
self thread HAHAHAHAHA();
} else {
self notify("WAAAAAAAAAAA");
}
HAHAHAHAHA()
{
self endon("WAAAAAAAAAAA");
//code
}
This will end the thread if the player got too far from the location
@EDIT: Epic fail, I forgot to put loop in the code if it was necessary.