Jump to content
Sign in to follow this  
gandalf the white

stop that script!

Recommended Posts

wow, you actually clicked this topic! that's good! thanks! biggrin_o.gif

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 smile_o.gif

Share this post


Link to post
Share on other sites

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

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
<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 tounge_o.gif

Share this post


Link to post
Share on other sites

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

it worked!! biggrin_o.gif

here's your reward:

FDFbeach1.jpg

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 smile_o.gif .

stage of devellopment: either 40 % or 70 (prolly 70 tounge_o.gif ) , just need to finnish furnituring and make a briefing...

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  

×