Terran4999 0 Posted April 20, 2008 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
zwobot 22 Posted April 20, 2008 <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
Terran4999 0 Posted April 21, 2008 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
zwobot 22 Posted April 21, 2008 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