Jump to content
HelloCam3

Checking Condition in a named Trigger

Recommended Posts

I was wondering if it was possible to have a condition counting units in trigger with a name. The condition is part of an IF statement and is to be called in a script. Below is what I have tried but it gives me an error:

if ({behaviour _x == "COMBAT"} count blueInTrigger > 0) then {
	
	(leader w1Grp) kbAddTopic ["conv", "sentences.bikb", "", ""];
	[(name (leader w1Grp)), localize "STR_v11b"] call BIS_fnc_showSubtitle;
	(leader w1Grp) kbTell [player, "conv", "v11b", "SIDE"];

	sleep 5;
	
	} else {
	
	(leader w1Grp) kbAddTopic ["conv", "sentences.bikb", "", ""];
	[(name (leader w1Grp)), localize "STR_v11a"] call BIS_fnc_showSubtitle;
	(leader w1Grp) kbTell [player, "conv", "v11a", "SIDE"];

	sleep 5;
	
};

I don't wish to use a standard unit array because I want the condition to be adaptable (e.g. If I add or remove units, it will be able to account for them). Any and all help is appreciated!

Share this post


Link to post
Share on other sites

Sometimes one word can make a difference... :D

 

Cheers kylania!

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

×