Jump to content
Sign in to follow this  
flasher44

Variable

Recommended Posts

How to do a script that allow with a triger, when a civilian unit enter an area a garde to fire at all the civilian entering the area ?

Like this

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">guard doTarget civilian1<span id='postcolor'>

but this line works only for "civilian1" and I want the guard to react to any civilian disregarding of their name.

Thanks for your patience but I never learned programming.

Share this post


Link to post
Share on other sites

open the misson.sqm by renaming it to mission.txt. open it with notepad and search for the civilians. Now change the side of civilians to East or West (depending on your guards side). Now the guard will shoot all of them cause it is told that the civillians are hostile. If you dont want to have the guard shoot them all you can use the "setcaptive" command. Units will not shoot at captives. If you want to make them shoot at them change the status of the civilians to "setcaptive false".

Share this post


Link to post
Share on other sites

The problem is that I don't want the guard to shoot all of them I want him to shoot the only one that enter the restricted area and leave the others alone. How to make it shoot only the one that trigger the guard ?

Share this post


Link to post
Share on other sites

same as described only reverted.

make civillians all "setcaptive true" at init of mission and change it to "setcaptive false" when they enter the trigger. This should work with a little script that reads out the triggers content and modifies the corresponding unit to the desired state. In this case the script would have to change the captive status of the unit inlist trigger.

Share this post


Link to post
Share on other sites

That what I need a little script that reads out the triggers content and modifies the corresponding unit to the desired state.

I need help to do this script all the rest is easy.

Because so far my trigger modifies the all units, I don't know how to make it modify only one.

Thanks...

Share this post


Link to post
Share on other sites

Trigger: activated by: civilian/present/repeatedly

Condition: this

Put this into the trigger's activation field:

"_x setcaptive false" foreach thislist

~S~ CD

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  

×