Jump to content
Sign in to follow this  
_qor

How to end mission when object is destroyed?

Recommended Posts

I have got several ammo crates which have to be destroyed.

If this happens, mission should end.

I set a trigger with the condition:

{alive ammocrate} count units=0

but it doesnt work (yes, I set Type to "end"). So what do I have to add to condition and by which command do I attach the other ammo crates?

Is there a "notalive" command?

Currently I preview the mission and instantly debriefing pops up, even though I am out of the trigger's range. Why?

Edited by _qoR

Share this post


Link to post
Share on other sites

I assume EVERY ammocrate has to be destroyed. If your ammocrates are named "ammocrate1", "ammocrate2" etc, write this :

{alive _x} count [ammocrate1,ammocrate2,ammocrate3] == 0

Share this post


Link to post
Share on other sites

ah thats great!

thanks a lot ;)

but what about the double equal-sign? why just not only one? trying to understand those commands...

attendant question: is it possible to let the AI destroy those ammocrates? Using the waypoint "destroy" seems not to work. They stop at the last "move" waypoint and dont go on.

Besides, when I use an IED which blows up the whole building the crates are stored in, the crates are still not destroyed.

May it be that only shooting harms ammocrates?

Edited by _qoR

Share this post


Link to post
Share on other sites

== means equal to, like = in real life.

myvariable == blue

checks if myvariable is equal to "blue".

= is used when affecting a value to a variable, like in

myvariable = blue

gives the value "blue" to myvariable.

About ammo crates, they must be considered as enemy and valuable targets to be attacked by AI.

Share this post


Link to post
Share on other sites
but what about the double equal-sign? why just not only one? trying to understand those commands...

Little help for you... read the 2 editing/scripting links in my signature...

;)

Share this post


Link to post
Share on other sites

ah great, hope the editing guide doesnt confuse me even more ;)

Share this post


Link to post
Share on other sites

It was written for ArmA, but the most is working in ArmA2 too...

Share this post


Link to post
Share on other sites

I assume EVERY ammocrate has to be destroyed. If your ammocrates are named "ammocrate1", "ammocrate2" etc, write this :

 

{alive _x} count [ammocrate1,ammocrate2,ammocrate3] == 0

 

How would I go about making it so that if 2 out of 3 crates were destroyed the trigger is activated?

Share this post


Link to post
Share on other sites

I would try

 {alive _x} count [ammocrate1,ammocrate2,ammocrate3] <2 

Its a wild gues but i bett it will work.

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  

×