Squad¶
Members¶
Member |
Description |
---|---|
Squadmates will always prioritize firing at their squad’s attackTarget if they are able to. |
|
The current leader of this squad. |
|
The current members of this squad. |
|
The current order assigned to this squad. |
|
Get the vehicle claimed by this squad. |
Methods¶
Method |
Description |
---|---|
Assign a new member to this squad. |
|
Assigns a new order to this squad. |
|
Removes a member from this squad. |
|
Set the formation to a specified custom formation. |
|
Set a random formation, excluding custom formation. |
|
Removes a number of actors from this squad. |
|
Removes the specified actors from this squad. |
|
Static methods¶
Method |
Description |
---|---|
Creates a new squad with the specified actors. |
Details¶
-
class
Squad
¶ -
Actor
attackTarget
¶ Squadmates will always prioritize firing at their squad’s attackTarget if they are able to. Attack targets always override the current rules-of-engagement. If the attack target dies, this value will automatically be set to nil.
-
const bool
hasPlayerLeader
¶
-
void
SetCustomFormation
(array<Vector2> formation)¶ Set the formation to a specified custom formation. The formation data contains the location of each squad member, which is rotated according to the squad movement direction and scaled by the
formationWidth
andformationHeight
values. You can safely provide a greater number of locations than the current member count, which will be automatically used if more soldiers join the squad.
-
void
SetFormation
(FormationType formation)¶
-
void
SetFormationSize
(float formationWidth, float formationDepth)¶
-
void
SetRandomFormation
()¶ Set a random formation, excluding custom formation.
-
Squad
SplitSquad
(int count)¶ Removes a number of actors from this squad. The removed actors will form their own squad. Returns the new squad.
-
Squad
SplitSquad
(array<Actor> membersToDrop)¶ Removes the specified actors from this squad. The removed actors will form their own squad. Returns the new squad.
-
string
ToString
()¶
-
Actor