Jump to content
Sign in to follow this  
Luckyas

Need help with Foreach group on EAST

Recommended Posts

I am making a scenario where I need to have all the groups on the EAST side to change their behaviour. I tried to use foreach on multiple different ways but nothing seems to work.

This is what I tried:

{
   if (side _x == EAST) then {
_x allowFleeing 0;
_x setCombatMode "RED";
	};
} forEach allgroups;
{
   if (side _x == EAST) then {
group _x allowFleeing 0;
group _x setCombatMode "RED";
	};
} forEach allUnits;

Can someone help me?

Thanks

Share this post


Link to post
Share on other sites

Where is the problem? Does the loop not work or the behavior?

Sent from my WAS-LX1A using Tapatalk

Share this post


Link to post
Share on other sites

Hi Folks,

 

Does this help ??? You can change the "then" to whatever you need...

 

_opfor = [];

{if ((side _x) == east) then {_opfor pushBack _x}} forEach allUnits;

 

Regards,

Scott

Share this post


Link to post
Share on other sites
16 minutes ago, Luckyas said:

How did I not see that... I thought the combat mode effected the behaviour aswell. 

Thanks allot!

To put it in kks words:

You should try setCombatMode if you want to change the combat mode.

 

Cheers

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  

×