Home   Help Search Login Register  

Author Topic: How to make An Objective Complete After A Group of Units Is Killed?  (Read 553 times)

0 Members and 1 Guest are viewing this topic.

Alex

  • Guest
Hi All,
        How Do You Make An Objective Complete After A Group of Units Is Killed? By The Way The Group Moves So East Not Present Etc Will Not Work.
Thanks,
Alex

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
try a trigger with condition:
({alive _x} count (units yourgrp) == 0)

meaning when the amount of units alive in yourgrp is 0, the trigger goes off. Make a group by writing:
yourgrp = group this
in the groupleaders init field.
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Alex

  • Guest
Sorry Mate Could You Explain That For Me :)

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
meaning when the amount of units alive in yourgrp is 0, the trigger goes off.

Isn't that an explanation?  ;D

If you wonder wth the condition is, that one is a 'condition count' command. You only get worse explanations from the comref as you can see:
Quote
Counts elements in the array for which given condition is true. It is calculated as follows: 1) Set Count to 0. 2) For each element of array assign element as _x and evaluate condition expression. If true, increease count.

The groupnaming is not obligatory but it's an easier way than naming a bunch of people. Alternatively you could just name the leader as grp1leader, then you could use the condition:
{alive _x} count (units group grp1leader) == 0)

Need more?  :D
« Last Edit: 06 Mar 2004, 13:29:33 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Alex

  • Guest
I'll Keep In Touch Lol....  ;D.