Player

Use these methods to get the player state.

Static members

Member

Description

actor

Get the player actor.

actorIsGrounded

Returns true if the player character controller is on the ground.

allowAutoWaveRespawn

Controls if player can auto-respawn at the next wave by pressing fire or selecting a new spawn point.

allowChangeStance

Controls if player can change stances

allowExitVehicle

Controls if player can exit vehicles

allowJump

Controls if player can jump

allowKick

Controls if player can kick

allowLean

Controls if player can lean

allowMouseLook

Setting this value to false prevents the player from looking around.

allowSprint

Controls if player can sprint

enemyTeam

inputEnabled

Controls if all player input is ignored

isSpectator

movementEnabled

Controls if player infantry movement is active

movementInputEnabled

Controls if player can control infantry/vehicle movement

nightvisionEnabled

nighvisionEnabled

selectedLoadout

squad

Get the player squad.

team

useHelicopterAutoHoverMode

Static methods

Method

Description

MoveActor(delta)

Moves the first person player controller by the specified vector, respecting collisions with world geometry.

ResetSliding()

Stops the player controller from sliding on steep geometry.

ResetVelocity()

Sets the velocity of the player controller to zero.

SetFirstPersonRenderMode()

Sets the player’s third person actor model to only render shadows.

SetThirdPersonRenderMode()

Sets the player’s third person actor model to render normally.

Details

class Player
static const Actor actor

Get the player actor. This is the same as using ActorManager.playerActor

static const bool actorIsGrounded

Returns true if the player character controller is on the ground.

static bool allowAutoWaveRespawn

Controls if player can auto-respawn at the next wave by pressing fire or selecting a new spawn point.

static bool allowChangeStance

Controls if player can change stances

static bool allowExitVehicle

Controls if player can exit vehicles

static bool allowJump

Controls if player can jump

static bool allowKick

Controls if player can kick

static bool allowLean

Controls if player can lean

static bool allowMouseLook

Setting this value to false prevents the player from looking around.

static bool allowSprint

Controls if player can sprint

static const Team enemyTeam
static bool inputEnabled

Controls if all player input is ignored

static const bool isSpectator
static bool movementEnabled

Controls if player infantry movement is active

static bool movementInputEnabled

Controls if player can control infantry/vehicle movement

static bool nightvisionEnabled
static const bool nighvisionEnabled
static LoadoutSet selectedLoadout
static const Squad squad

Get the player squad.

static const Team team
static bool useHelicopterAutoHoverMode
static void MoveActor(Vector3 delta)

Moves the first person player controller by the specified vector, respecting collisions with world geometry.

static void ResetSliding()

Stops the player controller from sliding on steep geometry.

static void ResetVelocity()

Sets the velocity of the player controller to zero. Useful for stopping falls, etc.

static void SetFirstPersonRenderMode()

Sets the player’s third person actor model to only render shadows.

static void SetThirdPersonRenderMode()

Sets the player’s third person actor model to render normally.