CLEO Help Make your character walk to X Y Z coordinates

CLEO related
Status
Not open for further replies.

adnan

Member
Joined
Mar 22, 2014
Messages
19
Reaction score
0
Not really good at CLEO but I try to make something.

I want your character to walk to a specific X Y Z coordinate when it's activated.
(I know how to activate etc I just want to know the line to execute the action of walking to coordinates)

I thought the opcode 0603: task_go_to_coord_any_means could to this but I can't get it to work. Maybe this isn't the right one to make your player move though.

Can anyone help me out if this is possible? And how?

Thank you!
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,692
Reaction score
105
Code:
:char_goto
//0AB1: call @char_goto 4 XYZ 1@ 2@ 3@  sprint TRUE
repeat
   wait 0
   00A0: store_actor $PLAYER_ACTOR position_to 4@ 5@ 2@
   0063: 0@ -= 4@
   0063: 1@ -= 5@
   0604: get_Z_angle_for_point 0@ 1@ store_to 2@
   005B: 0@ += 4@
   005B: 1@ += 5@
   2@ *= 0.01745
   0A96: 4@ = actor $PLAYER_ACTOR struct
   4@ += 0x558
   0A8C: write_memory 4@ size 4 value 2@ virtual_protect 0
   if
       3@ == 0
   then
       4@ = 0xB73458
       4@ += 0x20
       0A8C: write_memory 4@ size 1 value 0 virtual_protect 0
       4@ = 0xB73458
       4@ += 0x3
       0A8C: write_memory 4@ size 1 value 255 virtual_protect 0
   else
       4@ = 0xB73458
       4@ += 0x20
       0A8C: write_memory 4@ size 1 value 255 virtual_protect 0
       4@ = 0xB73458
       4@ += 0x3
       0A8C: write_memory 4@ size 1 value 255 virtual_protect 0
   end                 
until 00ED: actor $PLAYER_ACTOR 0 near_point 0@ 1@ radius 0.5 0.5 on_foot
0AB2: ret 0
 
Status
Not open for further replies.
Top