Code:
//0AB1: @CREATE_VELOCITY_IN_LOOKING_DIRECTION 1 POWER 1.0 _STORE_TO 4@ 5@ 6@
:CREATE_VELOCITY_IN_LOOKING_DIRECTION
0087: 13@ = 0@ // (float)
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
068D: get_camera_position_to 24@ 25@ 26@
0063: 20@ -= 24@ // (float)
0063: 21@ -= 25@ // (float)
0063: 22@ -= 26@ // (float)
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
006B: 20@ *= 13@ // (float)
006B: 21@ *= 13@ // (float)
006B: 22@ *= 13@ // (float)
005B: 22@ += 13@ // (float)
005B: 0@ += 20@ // (float)
005B: 1@ += 21@ // (float)
005B: 2@ += 22@ // (float)
Actor.StorePos($PLAYER_ACTOR, 3@, 4@, 5@)
0063: 0@ -= 3@ // (float)
0063: 1@ -= 4@ // (float)
0063: 2@ -= 5@ // (float)
0AB2: RET 3 0@ 1@ 2@
Heres an example of this:
( Veeery simple flying hack )
Code:
{$CLEO .cs}
0000:
WHILE TRUE
WAIT 0
IF
0AB0: 87 // W
THEN
0AB1: @CREATE_VELOCITY_IN_LOOKING_DIRECTION 1 POWER 10.0 _STORE_TO 4@ 5@ 6@
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 4@ 5@ 6@
END
END
//0AB1: @CREATE_VELOCITY_IN_LOOKING_DIRECTION 1 POWER 1.0 _STORE_TO 4@ 5@ 6@
:CREATE_VELOCITY_IN_LOOKING_DIRECTION
0087: 13@ = 0@ // (float)
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
068D: get_camera_position_to 24@ 25@ 26@
0063: 20@ -= 24@ // (float)
0063: 21@ -= 25@ // (float)
0063: 22@ -= 26@ // (float)
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
006B: 20@ *= 13@ // (float)
006B: 21@ *= 13@ // (float)
006B: 22@ *= 13@ // (float)
005B: 22@ += 13@ // (float)
005B: 0@ += 20@ // (float)
005B: 1@ += 21@ // (float)
005B: 2@ += 22@ // (float)
Actor.StorePos($PLAYER_ACTOR, 3@, 4@, 5@)
0063: 0@ -= 3@ // (float)
0063: 1@ -= 4@ // (float)
0063: 2@ -= 5@ // (float)
0AB2: RET 3 0@ 1@ 2@