CLEO Help Object Help

CLEO related
Status
Not open for further replies.

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
So i've found this opcodes and found this interesting but i don't know what to replace 0@ in
069B: attach_object 0@ and how to get offset XYZ and rotation from body of actor.

Here's the full code:
Code:
069B: attach_object 0@ to_actor 38@ with_offset 10.0 30.5 20.0 rotation 0.0 0.0 0.0

THanks in advance  :somuchwin:
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Let me guess.. a FUCKIN' OBJECT  :dont_care:

Code:
04C4: store_coords_to 1@ 2@ 3@ from_actor $player_actor with_offset 5.0 3.0 1.0
0107: 0@ = create_object #WOOD_PENIS at 1@ 2@ 3@
069B: attach_object 0@ to_actor $player_actor with_offset 10.0 30.5 20.0 rotation 0.0 0.0 0.0
Actor don't have rotation, only XYZ. That's the object rotation offsets.

Make sure to load the model before creating it.
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Is there any way to get the XYZ, rotation of Objects quickly ? Or just change and test one by one ?  :surprised:
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Yeah, like this:

1@ = 0.0
2@ = 0.0
3@ = 0.0

:DOWN
wait 0
if
0AB0:
jf @UP
000B: 3@ += 1.0
jump @ATTACH

:UP
wait 0
if
0AB0:
jf @ DOWN
000F: 3@ -= 1.0
jump @ATTACH

:ATTACH
069B: attach_object 0@ to_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 rotation 1@ 2@ 3@
printf "A: %f B: %f C: %f" 1000
jump @ DOWN
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Code:
printf "A: %f B: %f C: %f" 1000
What does this line actually do ? i don't get it well
surprised.gif
 

Xer

Well-known member
Joined
May 11, 2013
Messages
256
Reaction score
0
D.Kay link said:
Code:
printf "A: %f B: %f C: %f" 1000
What does this line actually do ? i don't get it well
surprised.gif

maybe shows the position of an object.  :me_gusta:
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
D.Kay link said:
Code:
printf "A: %f B: %f C: %f" 1000
What does this line actually do ? i don't get it well
surprised.gif

It should be printf "A: %f B: %f C: %f" 1000 1@ 2@ 3@
Adds a message at the bottom center of the screen with the object rotation angle values.
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
I crashed hard , here's my code .. pls help me:
Code:
{$VERSION 3.1.0027}
{$CLEO .cs}

thread "Object"

4@ = 0.0
5@ = 0.0
6@ = 0.0

:DOWN
wait 0
if
0AB0:
jf @UP
000B: 6@ += 1.0
jump @DKAY_03

:UP
wait 0
if
0AB0:
jf [member=5997]Down[/member]
000F: 6@ -= 1.0
jump @DKAY_03


:DKAY_03
wait 0
Model.Load(#gate_autoR)
if and
Model.Available(#gate_autoR)
0ADC:   test_cheat "OBU"
Player.Defined($PLAYER_ACTOR)
else_jump @DKAY_03
0ACD: show_text_highpriority "~W~OBJECT PROTECT ON" time 1000
04C4: store_coords_to 1@ 2@ 3@ from_actor $player_actor with_offset 5.0 3.0 1.0
0107: 0@ = create_object #gate_autoR at 1@ 2@ 3@
069B: attach_object 0@ to_actor $PLAYER_ACTOR with_offset 4.0 0.5 -1.0 rotation 4@ 5@ 6@
printf "A: %f B: %f C: %f" 1000 4@ 5@ 6@
jump [member=5997]Down[/member]
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Here's an example:

Code:
:START                   
wait 0
if
0ADC: "OBJ"
jf @START
Model.Load(YOUR_OBJECT_HERE)
if
056D:   actor $PLAYER_ACTOR defined
jf @START
Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)
0@ = Object.Create(YOUR_OBJECT_HERE, 7@, 8@, 9@)
1@ = 0.0
2@ = 0.0
3@ = 0.0
4@ = 0.0
5@ = 0.0
6@ = 0.0
jump @ATTACH

:UP_O
wait 0
if
0AB0: 38
jf @DOWN_O
000B: 3@ += 1.0
jump @ATTACH

:DOWN_O
wait 0
if
0AB0: 40
jf @RIGHT_O
000F: 3@ -= 1.0
jump @ATTACH

:RIGHT_O 
wait 0
if
0AB0: 39
jf @LEFT_O
000B: 1@ += 1.0
jump @ATTACH

:LEFT_O
wait 0
if
0AB0: 37
jf @FORWARD_O
000F: 1@ -= 1.0
jump @ATTACH

:FORWARD_O
wait 0
if
0AB0: 187
jf @BACKWARD_O
000B: 2@ += 1.0
jump @ATTACH

:BACKWARD_O
wait 0
if
0AB0: 189
jf @UP_R
000F: 2@ -= 1.0
jump @ATTACH

:UP_R
wait 0
if
0AB0: 104
jf @DOWN_R
000B: 6@ += 1.0
jump @ATTACH

:DOWN_R
wait 0
if
0AB0: 98
jf @RIGHT_R
000F: 6@ -= 1.0
jump @ATTACH

:RIGHT_R 
wait 0
if
0AB0: 102
jf @LEFT_R
000B: 4@ += 1.0
jump @ATTACH

:LEFT_R
wait 0
if
0AB0: 100
jf @FORWARD_R
000F: 4@ -= 1.0
jump @ATTACH

:FORWARD_R
wait 0
if
0AB0: 107
jf @BACKWARD_R
000B: 5@ += 1.0
jump @ATTACH

:BACKWARD_R
wait 0
if
0AB0: 109
jf @UP_O
000F: 5@ -= 1.0
jump @ATTACH

:ATTACH
wait 0
069B: attach_object 0@ to_actor $PLAYER_ACTOR with_offset 1@ 2@ 3@ rotation 4@ 5@ 6@
printf "~Y~O1: ~G~%f ~Y~O2: ~G~%f ~Y~O3: ~G~%f ~N~~Y~R1: ~G~%f ~Y~R2: ~G~%f ~Y~R3: ~G~%f" 3000 1@ 2@ 3@ 4@ 5@ 6@
jump @DOWN_O
Do whatever you want with it.
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
[member=6677]TH3RM4L[/member] , i've tried your Script but it still crash pls help me  :yesyes:
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
yum this is really easy but you need to know more about scripting

and you need to calculate the object offset which is really hard though
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
blackHat link said:
yum this is really easy but you need to know more about scripting

and you need to calculate the object offset which is really hard though
Ye , the only obtacle for me is about calculating XYZ and Rotations of Objects ! D:
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
I think I know why you get crashed. You used "#gate_autoR", didn't you? Well, if yes, be aware that "#gate_autoR" is not a valid object. Next time, check that if the object you are trying to use is in the list.
 
Status
Not open for further replies.
Top