Jump to content
Sign in to follow this  
Jimmakos

AddAction for more playable units

Recommended Posts

How is it possible to add an action on more than one playable units? I want to add a simple action not only to the player but on other playable units as well.

So i don't have to repeat the "player1 AddAction" also for "player2 AddAction" also for "player3 AddAction" and so on.

Share this post


Link to post
Share on other sites


{_x addAction ["Exec the file", "somescript.sqf"]} forEach (if (isMultiplayer) then {playableUnits} else {switchableUnits});

  • Like 1

Share this post


Link to post
Share on other sites
{_x addAction ["Exec the file", "somescript.sqf"]} forEach (if (isMultiplayer) then {playableUnits} else {switchableUnits});

 

Worked like a charm, thanks!

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  

×