Home   Help Search Login Register  

Author Topic: How to check if whole group is unconscious  (Read 2444 times)

0 Members and 1 Guest are viewing this topic.

Offline Ole

  • Members
  • *
How to check if whole group is unconscious
« on: 12 Sep 2010, 23:08:52 »
Hi!

I am able to check if one unit is unconscious with this command :
if (lifeState player == "UNCONSCIOUS")

But i want to check if the whole group is unconscious
I have tried with this command :
 if (lifeState _x == "UNCONSCIOUS") foreach units MyGroup, but it does not work.

Can anybody tell me what i am doing wrong.

Thanks in advance.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: How to check if whole group is unconscious
« Reply #1 on: 12 Sep 2010, 23:26:15 »
Trigger condition:

Code: [Select]
{lifeState _x == "UNCONSCIOUS"} count units MyGroup == count units myGroup
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline Ole

  • Members
  • *
Re: How to check if whole group is unconscious (SOLVED)
« Reply #2 on: 12 Sep 2010, 23:59:39 »
Thank you!

Tested and worked like a charm  :D

SOLVED