Object Help

Status
Not open for further replies.

springfield

Well-Known Member
Staff member
Joined
Feb 18, 2005
Messages
2,942
Likes
41
Points
98
Website
www.ugbase.eu
10
#2
Let me guess.. a FUCKIN' OBJECT  :dont_care:

Code:
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $player_actor with_offset 5.0 3.0 1.0
0107: [email protected] = create_object #WOOD_PENIS at [email protected] [email protected] [email protected]
069B: attach_object [email protected] 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.
 
OP
OP
DzkAy

DzkAy

Well-Known Member
Joined
Feb 20, 2014
Messages
472
Likes
0
Points
16
10
#3
Is there any way to get the XYZ, rotation of Objects quickly ? Or just change and test one by one ?  :surprised:
 

ThermaL

Well-Known Member
Joined
Oct 23, 2013
Messages
1,594
Likes
0
Points
86
#4
OP
OP
DzkAy

DzkAy

Well-Known Member
Joined
Feb 20, 2014
Messages
472
Likes
0
Points
16
10
#5
Code:
printf "A: %f B: %f C: %f" 1000
What does this line actually do ? i don't get it well http://ugbase.eu/Smileys/ugb/surprised.gif
 

Xer

Well-Known Member
Joined
May 11, 2013
Messages
251
Likes
0
Points
66
Website
www.blowjob.com
#6
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 http://ugbase.eu/Smileys/ugb/surprised.gif
maybe shows the position of an object.  :me_gusta:
 

springfield

Well-Known Member
Staff member
Joined
Feb 18, 2005
Messages
2,942
Likes
41
Points
98
Website
www.ugbase.eu
10
#7
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 http://ugbase.eu/Smileys/ugb/surprised.gif
It should be printf "A: %f B: %f C: %f" 1000 [email protected] [email protected] [email protected]
Adds a message at the bottom center of the screen with the object rotation angle values.
 
OP
OP
DzkAy

DzkAy

Well-Known Member
Joined
Feb 20, 2014
Messages
472
Likes
0
Points
16
10
#8
I crashed hard , here's my code .. pls help me:
Code:
{$VERSION 3.1.0027}
{$CLEO .cs}

thread "Object"

[email protected] = 0.0
[email protected] = 0.0
[email protected] = 0.0

:DOWN
wait 0
if
0AB0:
jf @UP
000B: [email protected] += 1.0
jump @DKAY_03

:UP
wait 0
if
0AB0:
jf [member=5997]Down[/member]
000F: [email protected] -= 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 [email protected] [email protected] [email protected] from_actor $player_actor with_offset 5.0 3.0 1.0
0107: [email protected] = create_object #gate_autoR at [email protected] [email protected] [email protected]
069B: attach_object [email protected] to_actor $PLAYER_ACTOR with_offset 4.0 0.5 -1.0 rotation [email protected] [email protected] [email protected]
printf "A: %f B: %f C: %f" 1000 [email protected] [email protected] [email protected]
jump [member=5997]Down[/member]
 

ThermaL

Well-Known Member
Joined
Oct 23, 2013
Messages
1,594
Likes
0
Points
86
#9
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, [email protected], [email protected], [email protected])
[email protected] = Object.Create(YOUR_OBJECT_HERE, [email protected], [email protected], [email protected])
[email protected] = 0.0
[email protected] = 0.0
[email protected] = 0.0
[email protected] = 0.0
[email protected] = 0.0
[email protected] = 0.0
jump @ATTACH

:UP_O
wait 0
if
0AB0: 38
jf @DOWN_O
000B: [email protected] += 1.0
jump @ATTACH

:DOWN_O
wait 0
if
0AB0: 40
jf @RIGHT_O
000F: [email protected] -= 1.0
jump @ATTACH

:RIGHT_O 
wait 0
if
0AB0: 39
jf @LEFT_O
000B: [email protected] += 1.0
jump @ATTACH

:LEFT_O
wait 0
if
0AB0: 37
jf @FORWARD_O
000F: [email protected] -= 1.0
jump @ATTACH

:FORWARD_O
wait 0
if
0AB0: 187
jf @BACKWARD_O
000B: [email protected] += 1.0
jump @ATTACH

:BACKWARD_O
wait 0
if
0AB0: 189
jf @UP_R
000F: [email protected] -= 1.0
jump @ATTACH

:UP_R
wait 0
if
0AB0: 104
jf @DOWN_R
000B: [email protected] += 1.0
jump @ATTACH

:DOWN_R
wait 0
if
0AB0: 98
jf @RIGHT_R
000F: [email protected] -= 1.0
jump @ATTACH

:RIGHT_R 
wait 0
if
0AB0: 102
jf @LEFT_R
000B: [email protected] += 1.0
jump @ATTACH

:LEFT_R
wait 0
if
0AB0: 100
jf @FORWARD_R
000F: [email protected] -= 1.0
jump @ATTACH

:FORWARD_R
wait 0
if
0AB0: 107
jf @BACKWARD_R
000B: [email protected] += 1.0
jump @ATTACH

:BACKWARD_R
wait 0
if
0AB0: 109
jf @UP_O
000F: [email protected] -= 1.0
jump @ATTACH

:ATTACH
wait 0
069B: attach_object [email protected] to_actor $PLAYER_ACTOR with_offset [email protected] [email protected] [email protected] rotation [email protected] [email protected] [email protected]
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 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
jump @DOWN_O
Do whatever you want with it.
 
OP
OP
DzkAy

DzkAy

Well-Known Member
Joined
Feb 20, 2014
Messages
472
Likes
0
Points
16
10
#10
[member=6677]TH3RM4L[/member] , i've tried your Script but it still crash pls help me  :yesyes:
 

blackHat

Well-Known Member
Joined
Jul 28, 2013
Messages
931
Likes
0
Points
66
#11
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
 
OP
OP
DzkAy

DzkAy

Well-Known Member
Joined
Feb 20, 2014
Messages
472
Likes
0
Points
16
10
#12
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

Well-Known Member
Joined
Oct 23, 2013
Messages
1,594
Likes
0
Points
86
#13
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.
 
OP
OP
DzkAy

DzkAy

Well-Known Member
Joined
Feb 20, 2014
Messages
472
Likes
0
Points
16
10
#15
you mean Model.Load(IDobject) ? and Object.Create(ID,bla,bla,bla) ?
 
Status
Not open for further replies.
Top