[SNIPPET] CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION w offset

//0AB1: @CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION 1 WITH_OFFSET 3.0 _STORE_TO 1@ 2@ 3@

Code:
//0AB1: @CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION 1 WITH_OFFSET 3.0 _STORE_TO 1@ 2@ 3@
:CREATE_CORDS_AROUND_PLAYER_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) 
0AB2: RET 3 0@ 1@ 2@

Example:

Code:
{$CLEO .cs}
0000:

WHILE TRUE
    WAIT 0
    0AB1: @CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION 1 WITH_OFFSET 3.0 _STORE_TO 1@ 2@ 3@
    04D5: create_corona_at 1@ 2@ 3@ radius 1.0 type 0 flare 0 RGB 255 0 0  
END

//0AB1: @CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION 1 WITH_OFFSET 3.0 _STORE_TO 1@ 2@ 3@
:CREATE_OFFSETS_AROUND_PLAYER_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) 
0AB2: RET 3 0@ 1@ 2@

If you combine this with set velocity in looking direction u get some awesome shit xD
 

Simon98

Well-known member
Joined
Feb 18, 2014
Messages
287
Reaction score
0
Re: CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION w offset

What the Hell is This??
 

TheZeRots

Expert
Joined
Dec 21, 2013
Messages
1,247
Reaction score
1
Re: CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION w offset

Hmmm, any ideas of what could be done with this? I really can't wrap my head around this...



Simon98 link said:
What the Hell is This??
This is obviously a programming snippet, a function. Not much for you here...
 
Top