Hello.
I'd like to make my WP check whether one object is in a set range of a different object (for example, I want to find object with ID 100000, and check if there's object with ID 110000 in a range of 100 of the 100000 one). How should I go about changing my position to pawn with ID 100000 without actually going to this object?
Or, if there's any other way to do it, please post it.
I'm sure that I've seen it in one WP, but can't find it, so I'd like to be either pointed to that WP if anyone knows which one it was, or a few lines of code that will do what I'd like to do.
Cheers
check pawn range from another pawn position?
Re: check pawn range from another pawn position?
Code: Select all
local pawn1 =
local pawn2 =
local distance = distance(pawn1.X, pawn1.Z, pawn2.X, pawn2.Z)Then you can do what ever calculations you want on distance
Code: Select all
if distance > 10000 then
blah blah
else
thisnthat
endRemember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: check pawn range from another pawn position?
Far simpler that I hoped it would be. Thanks a lot!