Totibbs 0 Posted August 5, 2002 How can you stop a script? Because Ive a script with a loop in it. But I want to stop the loop if a East soldier gets in a trigger. East, Present condition: this on activation:<< what to type here to stop the script?>> Share this post Link to post Share on other sites
bn880 5 Posted August 5, 2002 Ok. In the activation field of the trigger put </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">stopScript1 = true;<span id='postcolor'> and in your script at the beginning put </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">stopScript1 = false;<span id='postcolor'> then down in the script somewhere check for and do </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">?stopScript:exit;<span id='postcolor'> Share this post Link to post Share on other sites
Totibbs 0 Posted August 5, 2002 it doesnt seems to work this is the script: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE"> #loop stopScript1 = false ?stopScript:exit ofi playmove"FXStandDip" ofi_1 playmove"FXStandDip" Goto "loop"<span id='postcolor'> Share this post Link to post Share on other sites
der bastler 0 Posted August 5, 2002 You must not initialize "stopScript1" in the loop! And keep the variable's name... ;-) correct code-sample: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> stopScript1 = false #loop ?stopScript1: exit ofi playmove "FXStandDip" ofi_1 playmove "FXStandDip" Goto "loop" <span id='postcolor'> Share this post Link to post Share on other sites
bn880 5 Posted August 5, 2002 Umm, yea. Working now? I'm sure it is! Share this post Link to post Share on other sites
Totibbs 0 Posted August 6, 2002 It is still not working. Im really dont know what I do wrong. Because I copy/paste it. The eastern boy activates the trigger with on activation: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">stopScript1 = true<span id='postcolor'> because I made a sound effect in it... "we surrender". Its just a check I know the trigger is activated. But the "stopScript1 = true" doesnt seem to work Share this post Link to post Share on other sites
RED 0 Posted August 6, 2002 What I would do is: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> stopScript1 = 0 #loop ~1 ?stopScript1 == 1: goto "end" ofi playmove "FXStandDip" ofi_1 playmove "FXStandDip" Goto "loop" #end hint "script stopped" exit <span id='postcolor'> (edit: if you use this make sure you make the triggers onactivation field "stopScript1 = 1") RED Share this post Link to post Share on other sites
der bastler 0 Posted August 6, 2002 Right Red! I think that delay "~1" is important... Share this post Link to post Share on other sites