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.

allowMouseLook

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

enemyTeam

isSpectator

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 allowMouseLook

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

static const Team enemyTeam
static const bool isSpectator
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.