01-05-2012, 10:01
I have this code inside a while(1) which is active all the time while the player is spawned, but it ALWAYS returns true, no matter where you are in the map.
have I done anything wrong? yes, level.currentintel and level.intel[ID].coordinates are defined, forced before anything else is. i have set self.nearintel = false; when the player connects.
thanks in advance
Code:
if(Distance(self.origin, level.intel[level.currentintel].coordinates) <= 70) self.nearintel = true;
else self.nearintel = false;
have I done anything wrong? yes, level.currentintel and level.intel[ID].coordinates are defined, forced before anything else is. i have set self.nearintel = false; when the player connects.
thanks in advance