OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Ole on 12 Sep 2010, 23:08:52

Title: How to check if whole group is unconscious
Post by: Ole 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.
Title: Re: How to check if whole group is unconscious
Post by: laggy on 12 Sep 2010, 23:26:15
Trigger condition:

Code: [Select]
{lifeState _x == "UNCONSCIOUS"} count units MyGroup == count units myGroup
Title: Re: How to check if whole group is unconscious (SOLVED)
Post by: Ole on 12 Sep 2010, 23:59:39
Thank you!

Tested and worked like a charm  :D

SOLVED