CLEO Help [HELP]Getting target player Pos twice

CLEO related
Status
Not open for further replies.

afattahniz

Active member
Joined
Jun 8, 2015
Messages
74
Reaction score
0
Hello ugbase!
I am making a cleo which should tell me if target player is standing at one position since 30seconds,
if so then it should show me msg player is not moving etc..
but i do not know how to get target pos twice, means getting 1st pos before 30sec
and another pos after 30sec.
So how do we do it getting 2 different pos (cooards) of same player twice?
Am just newbie in scripting so want just help!
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
Call 00A0 to get the player position to start with, then either use 'wait 30000' or 32@/33@ timers, then call again 00A0 and compare the position with the first, be sure to check if the player still exists, cause in 30 second he could've gone out of the stream.

[shcode=cpp]
32@ = 0
00A0: store_actor 0@ position_to 1@ 2@ 3@
repeat
   wait 0
   
   if 856D: actor 0@ defined
   then
       printf "player has disappeared"
       break
   end
   
   if 80EC: actor 0@ sphere 0 near_point 1@ 2@ radius 1.0 1.0
   then
       printf "player has moved"
       break
   end
until 32@ > 30000
[/shcode]
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
Nope, unless the server has map markers enabled for players.
Then you could use SF opcode 0B2F: streamed_out_pos 1@ to 2@ 3@ 4@
 
Status
Not open for further replies.
Top