Results 1 to 5 of 5

Thread: Hw to... detect if all group members are dead

  1. #1
    I want to make a trigger to activate when a whole squad is wipped out.

    SQUAD:
    Compossed by squad leader, machine gunner, 3 riflemen and a medic.
    Squad leader's name sla01
    machine gunner's name sla02
    riflemen's names sla03, sla04, sla05 and
    medic's name sla06

    ... at the beginning I used this code in the CONDITION field in the trigger:
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">not&#40;alive sla01&#41; and not&#40;alive sla02&#41; and not&#40;alive sla03&#41; and not&#40;alive sla04&#41; and not&#40;alive sla05&#41; and not&#40;alive sla06&#41;[/QUOTE]
    But when I used many squads it gets very tiring to do this everytime, so I wondered if there&#39;s a way to make trigger detect if a whole group is dead.

    Maybe if I set this squad in a group like
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sla01 setgroupid &#91;&#34;Eagle squad&#34;&#93;[/QUOTE]

  2. #2
    Master Gunnery Sergeant
    Join Date
    Dec 18 2005
    Location
    Adelaide, Australia
    Posts
    1,306
    {alive _x} count (units groupName)

    will return the number of alive units in groupName. For a trigger condition, simply check for when this value == 0.



    [self-promotion]
    OFP:R Island : Rezina
    [/self-promotion]

  3. #3
    Master Gunnery Sergeant
    Join Date
    Sep 10 2004
    Location
    Finland
    Posts
    1,287
    For this an answer can also be found from the OFPEC Editors Depot, under functions.

    Even though you use ArmA, check also the OFP resources at OFPEC, they often are perfectly valid solutions for ArmA too.

    It&#39;s one of the first places you should check.

  4. #4
    Or you could just do it the easy way and group a trigger to the GL and set it to "whole group" not present.
    When you kill a man you&#39;re a murderer.....Kill many and you&#39;re a conqueror....Killem all and you&#39;re a GOD&#33;

  5. #5
    Your method isn't working for me, Op4 BuhBye. I have the trigger grouped to the team leader, whole group not present. Condition this, on activation hint "Team Blah are dead!" but it always hints me when the team leader is killed.

    EDIT. OK, so I need: groupname = group this
    Last edited by Touch Off; Oct 4 2009 at 16:13.
    i5 3570k, GTX670, 8GB 1600MHz RAM, P8Z77 V-Pro, HX850, 830 128GB SSD

Posting Permissions

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