Jump to content
Sign in to follow this  

Count all independent vehicles in trigger area.

Recommended Posts

I am making a mission on Isla Duala and I wish to have a trigger that counts all INDFOR vehicles and triggers when they are all destroyed.


I found this code:

getNumber (configfile >> "CfgVehicles" >> typeof my_unit >> "side") == 2;

But I am not sure if this will work. or how to actually get it to trigger when all tanks and BTR vehicles are destroyed.


Or would this code work?




This way I can have a condition where the players destroy all armoured vehicles, then can move in with infantry to attack the compound.



Share this post

Link to post
Share on other sites

Use trigger functionalities for that.

If you set trigger activation to Independent, the trigger will store only indfor units inside trigger in thisList variable.

You than  need only the statement for  activate the trigger.

(count (thislist select {alive _x && (_x isKindOf "Tank" || _x isKindOf "Car")})) isequalto 0
  • Thanks 1

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