Results 1 to 3 of 3

Thread: activate a trigger when a given number of persons is present?

  1. #1

    activate a trigger when a given number of persons is present?

    Howdy people,

    I'm working on a mission with lots of infantry on both sides. The objectives are to clear a town and hold it against a counterattack.

    I don't want to use the 'not present' setting, as it would make the mission veeery long since the counterattack consists of several tanks and a whole platoon of infantry, hunting down survivors would take far too long.

    Is there a way to have a trigger activate when the enemy has been decimated to a certain number? like when 3/4 of them are dead the task is considered complete?

    I think I've read something about that, but I couldn't find anything here.

    thanks for your help in advance guys

  2. #2
    Warrant Officer Demonized's Avatar
    Join Date
    Nov 16 2010
    Location
    Back from afk 2013
    Posts
    2,614
    trigger opfor present
    cond:
    Code:
    ({alive _x} count thisList) <= 5
    on act:
    Code:
    hint "only 5 or less opfor units left alive inside trigger area"
    Note: this will count vehicles also as 1 regardless of how many crew members was inside.
    so a tank with 3 crew members and 4 infantery units will count as 5 in this trigger condition.
    My scripts:
    Spoiler:

    what to do when posting any kind of code dammit!!

    Any new mission editor or scripter in Arma2 should have read Mr Murrays Editing Guide Deluxe at least once, it still applies for A2 even though it was made for Armed Assault.

  3. #3
    Staff Sergeant FLv*VeNoM*'s Avatar
    Join Date
    Oct 26 2007
    Location
    Hessen
    Posts
    307
    Author of the Thread
    Damn that was a fast one!
    And it works, thanks man! you helped me alot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •