gandalf the white 0 Posted October 30, 2004 wow, you actually clicked this topic! that's good! thanks! i want a script (artillery named impact.sqs) to stop when a 82 MM mortar is destroyed, how do i do that? preferably via a trigger? thanks in advance Share this post Link to post Share on other sites
T J 0 Posted October 30, 2004 In the script you need to check the status of the mortar. Or, you could have a global variable which is checked in the script (looping I assume?) and alter the variable accordingly when the mortar is destroyed. You could try adding an eventhandler, (dammaged) to the mortar and use that to exit the script......but its probably as simple as..... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?(getdammage MORTARNAME)>0.75 :EXIT tj Share this post Link to post Share on other sites
The Real Armstrong 0 Posted October 30, 2004 I've had bad experience with getdammage, so I would rather go for commands like canfire or canmove. Do not use !(alive XXX) 'cause if you will immobilise the arty cannon so it's non-functional, although the game recognizes it as alive, the trigger will not fire. Share this post Link to post Share on other sites
gandalf the white 0 Posted November 1, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?(getdammage MORTARNAME)>0.75 :EXIT this has to be at the start? (i've yet to succesfully edit my first script Share this post Link to post Share on other sites
korax 4 Posted November 1, 2004 It can go anywhere but depends on the script, if this is an artillery script then put it somewhere in the loop where it creates the shells (a sure way to find the loop is to look for a command like camcreate or createvehicle) because the script will always return to that point and it will be checked again and again for damage that way. Share this post Link to post Share on other sites
gandalf the white 0 Posted November 1, 2004 it worked!! here's your reward: TJ, Korax, and The Real Armstrong can also apply for map testers (multiplayer coop map 1 - 20 using FDF and editorupgrade) , just drop me a PM . stage of devellopment: either 40 % or 70 (prolly 70 ) , just need to finnish furnituring and make a briefing... Share this post Link to post Share on other sites