Actor
Members
Member |
Description |
---|---|
The weapon this actor has equipped. |
|
The index of this actor in the ActorManager.actors array |
|
The index of this actor in the ActorManager.GetActorsOnTeam() array |
|
Gets the |
|
When true, attackers will ignore their squads engagement rules when attacking this actor |
|
Returns true if the actor can capture points. |
|
When true, the actor can manually deploy their parachute. |
|
The center-of-mass position of the actor. |
|
Returns the capture point this actor is currently inside the capture range of. |
|
The direction this actor is aiming. |
|
Controls the enabled flag on this Actor’s hitbox colliders. |
|
True while actor is aiming with weapon. |
|
Returns true when the actor is at a resupply crate. |
|
A deactivated actor is temporarily removed from the game and can not interact with anything or respawn. |
|
Controls the frozen state of an Actor. |
|
True while Actor is climbing a Ladder. |
|
Controls the rendering of an actor. |
|
Returns true when the actor can resupply ammo. |
|
Returns true when the actor can resupply health. |
|
True while actor is sprinting. |
|
The ladder this actor is currently climbing |
|
The maximum allowed balance value. |
|
The maximum allowed balance value. |
|
The root position of the actor. |
|
Controls the maximum movement speed of the actor. |
|
Get the squad this actor is a member of. |
|
The velocity of the actor. |
Events
Event |
Description |
---|---|
Invoked when this actor takes damage. |
Methods
Method |
Description |
---|---|
Undo |
|
Adds an additional accessory renderer on top of the actors regular skin. |
|
Resets the skin of the actor to the game-managed team skin. |
|
Returns true if Actor takes damage when hit by the given weapon. |
|
Cuts the parachute. |
|
|
|
Used to temporarily disable an actor from the game. |
|
Deploys the parachute. |
|
Enters the target seat if it’s not already occupied. |
|
Force enters the target seat, kicking out any previous occupant. |
|
Makes the actor enter the vehicle. |
|
Equip a new weapon in the specified slot (0-4). |
|
Makes the actor get off the ladder. |
|
Ragdolls the actor. |
|
Forces the actor stance, regardless of level geometry |
|
Get the animated bone transform of the specified HumanoidBodyBone. |
|
Get the ragdoll bone transform of the specified HumanoidBodyBone. |
|
Makes the actor start climbing the ladder. |
|
Gets the current actor skin. Returns nil if actor is using the default team skin. |
|
Reloads all carried weapons instantly. |
|
Kills the actor. |
|
Kills the actor without reporting the kill. |
|
Ragdolls the actor and applies a force. |
|
Removes all accessory renderers. |
|
Remove the weapon in the specified slot (0-4). |
|
Set the bone local scale of the specified HumanoidBodyBone. |
|
Set the bone local scale of the specified HumanoidBodyBone. |
|
Set the ragdoll joint drive values. |
|
Reset the ragdoll joint drive to their default values. |
|
Sets the skin of this actor to an unmanaged skin. |
|
Sets the skin of this actor to an unmanaged skin. |
|
Sets the world scale of the WeaponParent transform, which controls scale of all held weapons. |
|
Set the local scale of the WeaponParent transform, which controls scale of all held weapons. |
|
Swaps with the target seat. |
|
Switches to the target seat. |
|
Set the position and rotation of this actor. |
|
Details
-
class Actor
-
-
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.
-
bool attackersIgnoreEngagementRules
When true, attackers will ignore their squads engagement rules when attacking this actor
-
float balance
-
const bool canBeSeated
-
bool canBeTargeted
-
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 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 GameObject gameObject
-
bool hasHeroArmor
-
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()
andDeactivate()`
-
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
-
bool isInvulnerable
-
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 unless the isIgnored value is also set.
-
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
-
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 bool wasRecentlyInWater
-
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 callback()
-
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?
-
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, 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 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 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, 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()
-
const int actorIndex