Jump to content
Sign in to follow this  
MaxiVsr10

Trigger activated when a certain number of units has been healed

Recommended Posts

Hi masters,

how do i activate a trigger when a certain number of units (AI in this case) has been healed by a medic?

I mean,i'm working a medevac mission and I need that one trigger activates when all wounded AI have been healed by the medic (a player).

What should I write on the condition field of the trigger?

Do I need a script?

Thanks for help and suggestion...

Share this post


Link to post
Share on other sites

Is all the AI's in the same group? Then you can use something like this (I think) in the condition field:

({damage _x == 0} count (units TheGroup)) == count (units TheGroup)

Share this post


Link to post
Share on other sites

I putted in the initialization field of the group leader

wounded = groupthis

Then a trigger activated by blufor with the following code in condition field

({damage _x == 0} count (units wounded)) == count (units wounded)

but nothing happens...

Where is the mistake?

Going crazy...:(

Share this post


Link to post
Share on other sites

Nothing,even with the space. I think maybe the code in the init field is not correct...

Share this post


Link to post
Share on other sites

Solved in this way. Give a name to the 4 wounded units : guywounded1,guywounded2 ecc.... Then place an object in map, put in the init field the code

wounded = [guywounded1, guywounded2, guywounded3, guywounded4];

Then put in the condition field of the trigger the folllowing code

({damage _x == 0} count (wounded)) == ({alive _x} count (wounded));

It works very well for me and it should work with less or more than 4 units. :bounce3:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×