Home   Help Search Login Register  

Author Topic: Not Alive Group  (Read 579 times)

0 Members and 1 Guest are viewing this topic.

Offline Captain Crunch

  • Members
  • *
Not Alive Group
« on: 31 Jan 2004, 00:29:17 »
Not Alive (PoliceGroup01) And Not Alive (PoliceGroup02) And Not Alive (PoliceGrooup03) And Not Alive (PoliceGroup04)

  I have this typed in a trigger, in the condition field. Now, it doesn't work I know. The syntax is totaly wrong! I t would have to be some like this:

Not Alive (_X ForEach Units PoliceGroup01) And Not...  and so on.

   But this is wrong as well. Anyone knows the right way?

     thanks much
Back to the forest!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Not Alive Group
« Reply #1 on: 31 Jan 2004, 02:13:58 »
In the group leaders init:
PoliceGroup01=units group this

In a trigger (or what u prefer):
Condition: "alive _x" count PoliceGroup01 == 0
On Act.: whatYouNeed


Or if you have in the leaders init PoliceGroup01=group this, change the trigger to "alive _x" count (units policeGroup01) == 0


No warranty on syntaxes  :P
« Last Edit: 31 Jan 2004, 02:15:55 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Not Alive Group
« Reply #2 on: 31 Jan 2004, 02:23:05 »
Or if you have nothing in the leader's init field, but the leader's
name:

"alive _x" count (units leadername) == 0

and form multiple groups or units:

"alive _x" count (units leaderA + units leaderB + units leaderC) == 0

would in your case case look like:

"alive _x" count (units policegroup01 + units policegroup02 + units policegroup03 + units policegroup04) == 0

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Captain Crunch

  • Members
  • *
Re:Not Alive Group
« Reply #3 on: 31 Jan 2004, 05:25:31 »
Thanks a lot guys!!!
Back to the forest!

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Not Alive Group
« Reply #4 on: 31 Jan 2004, 05:29:28 »
hmm - looks like this thread is then (*hint*) solved  8)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Unnamed

  • Guest
Re:Not Alive Group
« Reply #5 on: 31 Jan 2004, 07:32:14 »
Before you do, you can also use IsNull on a group to see if any of them are still alive. Same result perhaps not as demanding as counts on units?

Code: [Select]
"IsNull _x" count [policegroup01,policegroup02,policegroup03,policegroup04]==4

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Not Alive Group
« Reply #6 on: 31 Jan 2004, 10:38:49 »
I'm not sure you really need the alive.  Maybe something like this would do.

count (units grp1 + units grp2) == 0

However I like the isNull method, that looks more elegant.
Plenty of reviewed ArmA missions for you to play

deaddog

  • Guest
Re:Not Alive Group
« Reply #7 on: 31 Jan 2004, 16:54:58 »
"Alive _x" count units groupname

is better than

count units groupname

because there may be a delay before the count is accurately reflected using the second method.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Not Alive Group
« Reply #8 on: 31 Jan 2004, 23:27:18 »
Quote
However I like the isNull method, that looks more elegant.

Really macca?

I mean the method works, and everythings ok with it, and i
also agree on that it is a tricky one, but elegant it isn't.

The method is based upon something that doesn't exist,
so it's similar to a competition, where you would count:
the faults and bads of a side, just to compare, which side
got more "minus-points", to locate the side who lost -
instead of checking who made more goods and points to be
the winner.

Anyway, no prob with the isNull method here (i do honor it too),
just thought to say that it's not elegant  ;D

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Not Alive Group
« Reply #9 on: 01 Feb 2004, 04:02:14 »
lol I just like the idea of counting things that don't exist.
Plenty of reviewed ArmA missions for you to play