Squad
Members
Member |
Description |
---|---|
Squadmates will always prioritize firing at their squad’s attackTarget if they are able to. |
|
When set to true while in transport vehicle, will automatically drop passengers when close to attack point destination. |
|
Returns true if the squad has landed their helicopter. |
|
Returns true if the squad is performing a landing or has landed a helicopter. |
|
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. |
Events
Event |
Description |
---|---|
Invoked whenever the squad leader wants to go to the order objective. |
Methods
Method |
Description |
---|---|
Assign a new member to this squad. |
|
Assigns a new order to this squad. |
|
Cancels a landing. |
|
Claims the LZ |
|
Drops all transported passengers |
|
Lands at LZ and claims it |
|
Lands at LZ and claims it and calls function when landing completes. |
|
Lands at position. |
|
Lands at position and calls function when landing completes. |
|
|
Lands at position and calls function when landing completes. |
Drops the squade’s current LZ claim. |
|
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. |
|
Cancels a landing and takes off. |
|
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.
-
bool autoDropTransportedPassengers
When set to true while in transport vehicle, will automatically drop passengers when close to attack point destination.
-
const HelicopterLandingZone claimedLandingZone
-
const bool hasLanded
Returns true if the squad has landed their helicopter.
-
const bool hasLandingZoneClaim
-
const bool hasPlayerLeader
-
const bool isPerformingLanding
Returns true if the squad is performing a landing or has landed a helicopter. Also see
hasLanded
.
-
const ScriptEvent onIssueOrderMovement
Callback Signature:
-
void callback()
Note
This event can be consumed by calling
CurrentEvent.Consume()
. Consume this event to prevent the default squad leader movementInvoked whenever the squad leader wants to go to the order objective.
-
void callback()
-
void CancelLanding()
Cancels a landing.
-
void ClaimLandingZone(HelicopterLandingZone lz)
Claims the LZ Any claimed landing zones will not be used by other squads.
-
array<AiActorController> DropTransportedPassengers()
Drops all transported passengers Any passengers on mounted weapons will stay in the vehicle. Returns the dropped passengers.
-
void LandHelicopterAndClaimLandingZone(HelicopterLandingZone lz)
Lands at LZ and claims it Any claimed landing zones will not be used by other squads.
-
void LandHelicopterAndClaimLandingZone(HelicopterLandingZone lz, string onLandFunctionName)
Lands at LZ and claims it and calls function when landing completes. Any claimed landing zones will not be used by other squads. Callback function signature:
OnLand(squad, eventData)
-
void LandHelicopterAtPosition(Vector3 position, string onLandFunctionName)
Lands at position and calls function when landing completes. Callback function signature:
OnLand(squad, eventData)
-
void LandHelicopterAtPosition(Vector3 position, string onLandFunctionName, DynValue eventData)
Lands at position and calls function when landing completes. Callback function signature:
OnLand(squad, eventData)
-
void ReleaseLandingZoneClaim()
Drops the squade’s current LZ claim. This is automatically done when the squad is disbanded.
-
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.
-
void TakeOff()
Cancels a landing and takes off.
-
string ToString()
-
Actor attackTarget