Jump to content
Sign in to follow this  
alleycat

a setleader command?

Recommended Posts

is there something like a setleader command? I have a script in which I want to mark a unit in a group to be its leader. And so far only completely disassembling it and creating new group works. I have tried to change ranks but that has no immediate rank change.

Share this post


Link to post
Share on other sites

How 'bout this?

https://community.bistudio.com/wiki/setLeader

Be aware that the effect is local unless both leader unit and team are local to the machine this command is executed on.

So if you use this in multiplayer with a group of players, you need to execute this command using BIS_fnc_MP:

[[_myTeam, player], "setLeader", true, false, true] call BIS_fnc_MP

Edited by Heeeere's Johnny!

Share this post


Link to post
Share on other sites

Having problems with the _myteam variable. Using a group does not work:

_grp = group _unit;



[[_grp, _unit], "setLeader", true, false, true] call BIS_fnc_MP;

Error setleader: Type Group, expected Team member

Could it be the setleader command is using the sub-squad level teams (which squad leaders can create) for that?

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  

×