Jump to content

Recommended Posts

Hey Guys,

 

i have here a script which should force the AI to Choose between [ setUnitPos "UP" and setUnitPos "MIDDLE" ] and prevent the AI from Prone.

but somehow it dosent work.

 

{ 
   if (side _x == resistance) then {
	 
	_Stance = ["UP", "MIDDLE"]; 
	{_x setUnitPos _Stance select (floor random 2)} 
   
	}; 

} forEach allUnits;

maybe im doing something wrong could you pls help.

Share this post


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

{_x setUnitPos _Stance select (floor random 2)}

This part won't be executed. Leave out the brackets:
 

{ 
   if (side _x == resistance) then {
		_x setUnitPos (selectRandom ["UP", "MIDDLE"]);
	};
} forEach allUnits;

 

  • Thanks 1

Share this post


Link to post
Share on other sites
20 minutes ago, 7erra said:

This part won't be executed. Leave out the brackets:
 


{ 
   if (side _x == resistance) then {
		_x setUnitPos (selectRandom ["UP", "MIDDLE"]);
	};
} forEach allUnits;

 

thank you this works.

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

×