Arma 3 Scripting

Command in Unit Control

formLeader

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns the formation leader of a given unit. This is often the same as the group leader, but not always, for example in cases when a unit is ordered to follow another unit.

Syntax

formLeader unitName

Parameters:

Returns: Object - the leader of the formation is returned. If used on a dead unit, the returned value is objNull

Examples

Example 1

if (formLeader player != leader player) then
{
    hint "The formation leader is different to the group leader!";
};

See also

commandFollow · doFollow · formationLeader · isFormationLeader · leader · selectLeader · setLeader