Actor

Members

Member

Description

activeSeat

activeWeapon

The weapon this actor has equipped.

activeVehicle

actorIndex

The index of this actor in the ActorManager.actors array

actorTeamIndex

The index of this actor in the ActorManager.GetActorsOnTeam() array

aiController

Gets the AiActorController of this actor.

balance

canBeSeated

canCapturePoint

Returns true if the actor can capture points.

canDeployParachute

When true, the actor can manually deploy their parachute.

centerPosition

The center-of-mass position of the actor.

currentCapturePoint

Returns the capture point this actor is currently inside the capture range of.

dropsAmmoOnKick

facingDirection

The direction this actor is aiming.

gameObject

health

hitboxCollidersAreEnabled

Controls the enabled flag on this Actor’s hitbox colliders.

isAiming

True while actor is aiming with weapon.

isAtResupplyCrate

Returns true when the actor is at a resupply crate.

isBot

isCrouching

isDeactivated

A deactivated actor is temporarily removed from the game and can not interact with anything or respawn.

isDead

isDriver

isFallenOver

isFrozen

Controls the frozen state of an Actor.

isInWater

isOnLadder

True while Actor is climbing a Ladder.

isParachuteDeployed

isPassenger

isPlayer

isProne

isReadyToSpawn

isRendered

Controls the rendering of an actor.

isResupplyingAmmo

Returns true when the actor can resupply ammo.

isResupplyingHealth

Returns true when the actor can resupply health.

isSeated

isSprinting

True while actor is sprinting.

isStanding

isSwimming

ladder

The ladder this actor is currently climbing

maxBalance

The maximum allowed balance value.

maxHealth

The maximum allowed balance value.

name

needsResupply

position

The root position of the actor.

rotation

speedMultiplier

Controls the maximum movement speed of the actor.

squad

Get the squad this actor is a member of.

team

transform

wasRecentlyInWater

weaponSlots

velocity

The velocity of the actor.

Events

Event

Description

onTakeDamage

Invoked when this actor takes damage.

Methods

Method

Description

Activate()

Undo Deactivate()

AddAccessory(mesh, materials)

Adds an additional accessory renderer on top of the actors regular skin.

ApplyTeamSkin()

Resets the skin of the actor to the game-managed team skin.

CanBeDamagedBy(weapon)

Returns true if Actor takes damage when hit by the given weapon.

CanEnterSeat(seat)

CutParachute()

Cuts the parachute.

Damage(health)

Damage(source, info)

Damage(source, health, balance, isSplash, isPiercing)

Damage(source, health, balance, isSplash, isPiercing, point, direction, force)

Deactivate()

Used to temporarily disable an actor from the game.

DeployParachute()

Deploys the parachute.

EnterSeat(seat)

Enters the target seat if it’s not already occupied.

EnterSeatForced(seat)

Force enters the target seat, kicking out any previous occupant.

EnterVehicle(vehicle)

Makes the actor enter the vehicle.

EquipNewWeaponEntry(entry, slotNumber, forceSwitchTo)

Equip a new weapon in the specified slot (0-4).

EvaluateShotDifficulty(target, weapon)

ExitLadder()

Makes the actor get off the ladder.

ExitVehicle()

FallOver()

Ragdolls the actor.

GetHumanoidTransformAnimated(bone)

Get the animated bone transform of the specified HumanoidBodyBone.

GetHumanoidTransformRagdoll(bone)

Get the ragdoll bone transform of the specified HumanoidBodyBone.

GetOnLadder(ladder)

Makes the actor start climbing the ladder.

GetOverrideActorSkin()

Gets the current actor skin. Returns nil if actor is using the default team skin.

GetSkinnedMeshRendererAnimated()

GetSkinnedMeshRendererRagdoll()

InstantlyReloadCarriedWeapons()

Reloads all carried weapons instantly.

IsWeaponUnholstered()

Kill(killer)

Kills the actor.

KillSilently()

Kills the actor without reporting the kill.

KnockOver(force)

Ragdolls the actor and applies a force.

RemoveAccessories()

Removes all accessory renderers.

RemoveWeapon(slotNumber)

Remove the weapon in the specified slot (0-4).

ResupplyAmmo()

ResupplyHealth()

SetHumanoidBoneScale(bone, scale)

Set the bone local scale of the specified HumanoidBodyBone.

SetHumanoidBoneScale(bone, scale)

Set the bone local scale of the specified HumanoidBodyBone.

SetRagdollJointDrive(spring, stiffness)

Set the ragdoll joint drive values.

SetRagdollJointDriveDefault()

Reset the ragdoll joint drive to their default values.

SetSkin(actorSkin)

Sets the skin of this actor to an unmanaged skin.

SetSkin(mesh, materials, teamMaterialIndex)

Sets the skin of this actor to an unmanaged skin.

SetWeaponParentApproximateWorldScale(scale)

Sets the world scale of the WeaponParent transform, which controls scale of all held weapons.

SetWeaponParentScale(scale)

Set the local scale of the WeaponParent transform, which controls scale of all held weapons.

SpawnAt(position)

SpawnAt(position, rotation)

SwapWithSeat(seat)

Swaps with the target seat.

SwitchToSeat(seat)

Switches to the target seat.

TeleportTo(position, rotation)

Set the position and rotation of this actor.

ToString()

Details

class Actor
const Seat activeSeat
const Weapon activeWeapon

The weapon this actor has equipped.

const Vehicle activeVehicle
const int actorIndex

The index of this actor in the ActorManager.actors array

const int actorTeamIndex

The index of this actor in the ActorManager.GetActorsOnTeam() array

const AiActorController aiController

Gets the AiActorController of this actor. Returns nil if called on the player actor.

float balance
const bool canBeSeated
const bool canCapturePoint

Returns true if the actor can capture points. This value may be false if the actor is in a vehicle that cannot capture points such as helicopters, etc

bool canDeployParachute

When true, the actor can manually deploy their parachute.

const Vector3 centerPosition

The center-of-mass position of the actor.

const CapturePoint currentCapturePoint

Returns the capture point this actor is currently inside the capture range of. Returns nil if no capture point is in range.

bool dropsAmmoOnKick
const Vector3 facingDirection

The direction this actor is aiming.

const GameObject gameObject
float health
bool hitboxCollidersAreEnabled

Controls the enabled flag on this Actor’s hitbox colliders. Disabling them means this actor can not be hit by projectiles or collide with vehicles

const bool isAiming

True while actor is aiming with weapon.

const bool isAtResupplyCrate

Returns true when the actor is at a resupply crate.

const bool isBot
const bool isCrouching
const bool isDeactivated

A deactivated actor is temporarily removed from the game and can not interact with anything or respawn.Control this state with Activate() and Deactivate()`

const bool isDead
const bool isDriver
const bool isFallenOver
bool isFrozen

Controls the frozen state of an Actor. A frozen Actor cannot move or complete action such as firing, etc.

const bool isInWater
const bool isOnLadder

True while Actor is climbing a Ladder.

const bool isParachuteDeployed
const bool isPassenger
const bool isPlayer
const bool isProne
const bool isReadyToSpawn
bool isRendered

Controls the rendering of an actor. Please note that this is purely cosmetic, bots can still see and target an actor with disabled renders.

const bool isResupplyingAmmo

Returns true when the actor can resupply ammo.

const bool isResupplyingHealth

Returns true when the actor can resupply health.

const bool isSeated
const bool isSprinting

True while actor is sprinting.

const bool isStanding
const bool isSwimming
const Ladder ladder

The ladder this actor is currently climbing

float maxBalance

The maximum allowed balance value. The current balance value will gradually increase until it reaches this value. This is the balance value the actor will have when spawning.

float maxHealth

The maximum allowed balance value. Healing this actor will make its health cap out at this value. This is the health the actor will have when spawning.

string name
const bool needsResupply
const Vector3 position

The root position of the actor. The root position is usually at the ground by the feet.

const Quaternion rotation
float speedMultiplier

Controls the maximum movement speed of the actor. Default is 1.

const Squad squad

Get the squad this actor is a member of.

const Team team
const Transform transform
const bool wasRecentlyInWater
const array<Weapon> weaponSlots
const Vector3 velocity

The velocity of the actor. If seated, returns the vehicle velocity. If ragdolled, returns the ragdoll velocity. Otherwise returns movement velocity. Setting the velocity is only supported on the player actor. Setting the velocity of an AI actor will has no effect.

const ScriptEvent onTakeDamage

Callback Signature:

void callback()

Note

This event can be consumed by calling CurrentEvent.Consume(). Consuming this event stops the actor from taking damage.

Invoked when this actor takes damage.

void Activate()

Undo Deactivate()

void AddAccessory(Mesh mesh, array<Material> materials)

Adds an additional accessory renderer on top of the actors regular skin.

void ApplyTeamSkin()

Resets the skin of the actor to the game-managed team skin.

bool CanBeDamagedBy(Weapon weapon)

Returns true if Actor takes damage when hit by the given weapon.

Parameters

weapon – Can this weapon damage the Actor?

bool CanEnterSeat(Seat seat)
void CutParachute()

Cuts the parachute. This function ignores the canDeployParachute value.

bool Damage(float health)
bool Damage(Actor source, DamageInfo info)
bool Damage(Actor source, float health, float balance, bool isSplash, bool isPiercing)
bool Damage(Actor source, float health, float balance, bool isSplash, bool isPiercing, Vector3 point, Vector3 direction, Vector3 force)
void Deactivate()

Used to temporarily disable an actor from the game. Hides, Freezes and Disables Hitbox Colliders of this Actor. Also stops the Actor from respawning.

void DeployParachute()

Deploys the parachute. This function ignores the canDeployParachute value.

bool EnterSeat(Seat seat)

Enters the target seat if it’s not already occupied. If the target seat is already occupied, the actor will not enter the seat, and this function returns false. If the actor could successfully enter the seat, the function returns true.

void EnterSeatForced(Seat seat)

Force enters the target seat, kicking out any previous occupant. If another seat is available in the vehicle, the previous occupant will swap to that seat. If not, they will exit the vehicle.

bool EnterVehicle(Vehicle vehicle)

Makes the actor enter the vehicle. If the actor is a squad leader, this automatically makes the squad claim the vehicle.

Weapon EquipNewWeaponEntry(WeaponEntry entry, int slotNumber, bool forceSwitchTo)

Equip a new weapon in the specified slot (0-4).

Difficulty EvaluateShotDifficulty(Actor target, Weapon weapon)
void ExitLadder()

Makes the actor get off the ladder. If the actor was close to the top or bottom, the actor will be positioned according on the ladder’s top or bottom exit points.

void ExitVehicle()
void FallOver()

Ragdolls the actor.

Transform GetHumanoidTransformAnimated(HumanBodyBones bone)

Get the animated bone transform of the specified HumanoidBodyBone.

Transform GetHumanoidTransformRagdoll(HumanBodyBones bone)

Get the ragdoll bone transform of the specified HumanoidBodyBone.

void GetOnLadder(Ladder ladder)

Makes the actor start climbing the ladder. The actor is positioned at the closest point on the ladder.

ActorSkin GetOverrideActorSkin()

Gets the current actor skin. Returns nil if actor is using the default team skin.

SkinnedMeshRenderer GetSkinnedMeshRendererAnimated()
SkinnedMeshRenderer GetSkinnedMeshRendererRagdoll()
void InstantlyReloadCarriedWeapons()

Reloads all carried weapons instantly.

bool IsWeaponUnholstered()
void Kill(Actor killer)

Kills the actor.

void KillSilently()

Kills the actor without reporting the kill. An actor killed this way will not contribute to the scoreboard or killfeed, and will not spawn a ragdoll.

void KnockOver(Vector3 force)

Ragdolls the actor and applies a force.

void RemoveAccessories()

Removes all accessory renderers.

void RemoveWeapon(int slotNumber)

Remove the weapon in the specified slot (0-4).

bool ResupplyAmmo()
bool ResupplyHealth()
void SetHumanoidBoneScale(HumanBodyBones bone, Vector3 scale)

Set the bone local scale of the specified HumanoidBodyBone.

void SetHumanoidBoneScale(HumanBodyBones bone, float scale)

Set the bone local scale of the specified HumanoidBodyBone.

void SetRagdollJointDrive(float spring, float stiffness)

Set the ragdoll joint drive values.

Parameters
  • spring – The spring force value (default 1000). A higher value yields a stronger force.

  • stiffness – The drag force value (default 3). A higher value yields a slower and more stable movement.

void SetRagdollJointDriveDefault()

Reset the ragdoll joint drive to their default values.

void SetSkin(ActorSkin actorSkin)

Sets the skin of this actor to an unmanaged skin. Unmanaged skins are not managed by the game, meaning that glow will not be automatically applied when the player enters night vision mode.

void SetSkin(Mesh mesh, array<Material> materials, int teamMaterialIndex)

Sets the skin of this actor to an unmanaged skin. Unmanaged skins are not managed by the game, meaning that glow will not be automatically applied when the player enters night vision mode.

Parameters
  • mesh – The mesh that should be applied to the actor. If nil, the mesh will not be replaced.

  • materials – The material array that should be applied to the renderer.

  • teamMaterialIndex – The material index that should be replaced by the team material. Set this value to -1 if no team material should be applied. Please note that this uses C# array indexing, meaning the first material entry is at index 0, the second and index 1, etc

void SetWeaponParentApproximateWorldScale(float scale)

Sets the world scale of the WeaponParent transform, which controls scale of all held weapons. If all parent bones and game objects are uniformly scaled on all axis, this will yield the correct world scale. If not, the world scale might be off.

void SetWeaponParentScale(float scale)

Set the local scale of the WeaponParent transform, which controls scale of all held weapons.

void SpawnAt(Vector3 position)
void SpawnAt(Vector3 position, Quaternion rotation)
bool SwapWithSeat(Seat seat)

Swaps with the target seat. If the target seat is already occupied, the two occupants will be swapped. If the target seat is not in the same vehicle, the swap is canceled and this function returns false.

bool SwitchToSeat(Seat seat)

Switches to the target seat. If the target seat is already occupied or is not in the same vehicle, the switch is canceled and this function returns false.

void TeleportTo(Vector3 position, Quaternion rotation)

Set the position and rotation of this actor. Only rotation on the Y axis is applied to the actor, any rotation on the X and Z axis is ignored.

string ToString()