| QUOTE (TLFdjobaw @ Monday, Jun 25 2012, 10:28) |
| Does Anyone know to spawn object using cleo script in easy way?? I learned some tutorial i still not understand... please tell me.. is there any easy way????? |
Ya there is an easy way.
Just follow the steps this code will spawn a jump ramp on pressing backspace :
{$CLEO .cs}
:JumpR00
03A4: name_thread 'JPR'
:JumpR01
0001: wait 0 ms
if
0256: player $PLAYER_CHAR defined
004D: jump_if_false @JumpR01
if
00E1: key_pressed 8//--------- backspace
004D: jump_if_false @JumpR01
0247: request_model 1655
:JumpR02
0001: wait 0 ms
if
0248: model 1655 available
004D: jump_if_false @JumpR02
0172: 2@ = actor $PLAYER_ACTOR z_angle
04C4: create_coordinate 11@ 12@ 13@ from_actor $PLAYER_ACTOR offset 0.0 14.5 -1.8
0107: 1@ = create_object 1655 at 11@ 12@ 13@ //this is the place where the object will be placed
0177: set_object 1@ z_angle_to 2@ //it is the angle of the object
0001: wait 0 ms
0249: release_model 1655
0001: wait 1000 ms
01C4: remove_references_to_object 1@ // This object will now disappear when the player looks away
0002: jump @JumpR01
If you have still any doubts PM me .Feel free to contact me.