Jump to content
Sign in to follow this  
Terran4999

Loop scripting help

Recommended Posts

hey, does anyone know how to loop a animation script?? I have no knowledge in scripting so i downloaded a script but i don't know how to loop it to repeat the animation.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

; Sample of passing an object to a script

 

; Get the object

_obj = _this select 0

 

; Make the unit do a push up

;In qoutes put soldier action

_obj SwitchMove "FXStandDip" :goto "loop";

exit

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_obj SwitchMove "FXStandDip" :goto "loop";

In a script you cannot execute 2 commands in a single line.

You should find out how long the "FXStandDip" animation takes in seconds and then:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#loop

_obj SwitchMove "FXStandDip"

~5

goto "loop"

The ~5 makes the script wait for 5 seconds before it goes back to the #loop label.

Share this post


Link to post
Share on other sites

Anothor newbie question, what is the command to destory 2 cars at once?? Is it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[car1,car2] setdammage 1.0

Share this post


Link to post
Share on other sites

You cannot destroy them simultaneously, you have to do it one after the other:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

car1 setDammage 1

car2 setDammage 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×