Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
bertram

Assign team colors in multiplayer

Recommended Posts

I've been working with trying to get team colors assigned via unit init or script in a mission, so when the mission begins on the server all players are already in their respective teams. I already know

this assignTeam "COLOR"

will not work in multiplayer, so that's out of the question. Currently I'm assigning team colors automatically through a really annoying trigger, while it works, I'd much rather have it be done in an easier way. Every unit is named, which can get tedious and leaves a lot of room for mistakes in large missions, and the trigger's onAct uses assignTeam "COLOR" but for every unit.

Is there any way I could assign team colors, conditionally, through an MP compatible script?

Share this post


Link to post
Share on other sites

You could use BIS_fnc_MP on the assignTeam command:

{
[[_x, "COLOR"], "assignTeam", true, true, true] call BIS_fnc_MP;
} forEach units _group;

//Forgive me if this may be incorrect in some capacity, never used it with a script command before (it's a new feature :p)

Share this post


Link to post
Share on other sites
Sign in to follow this  

×