ActorManager

Static members

Member

Description

actors

capturePoints

ladders

player

Get the player actor.

spawnPoints

vehicles

All currently spawned vehicles

Static methods

Method

Description

ActorCanSeePlayer(a)

ActorDistanceToPlayer(a)

ActorsCanSeeEachOther(a, b)

Returns true if the two actors have direct line of sight to each other.

ActorsDistance(a, b)

Returns the distance between two actors.

ActorsInRange(point, range)

AliveActorsInRange(point, range)

CreateAIActor(team)

Create a new AI Actor on the specified team.

Explode(info)

Triggers an explosion.

GetActorsOnTeam(team)

GetAliveActorsOnTeam(team)

GetCapturePointsOwnedByTeam(team)

GetNumberOfBotsInTeam(team)

GetSpawnableAIActor(team)

Get an AI Actor available for spawning on the specified team.

GetSpawnPointsOwnedByTeam(team)

GetSquadsOnTeam(team)

GetTeamSkin(team)

Returns the team skin of the specified team.

IsTeamDead(team)

Returns true if all actors on the team are dead.

PlayerTakeOverBot(actor)

Assume control over the target Actor.

RandomEnemySpawnPoint(team)

RandomFrontlineSpawnPointForTeam(team)

RandomSpawnPoint()

RandomSpawnPointForTeam(team)

SetTeamSkin(team, skin)

Sets the team skin of all actors on the specified team.

TeamHasAnySpawnPoint(team)

VehiclesInRange(point, range)

Details

class ActorManager
static const array<Actor> actors
static const array<CapturePoint> capturePoints
static const array<Ladder> ladders
static const Actor player

Get the player actor. This is the same as using Player.actor

static const array<SpawnPoint> spawnPoints
static const array<Vehicle> vehicles

All currently spawned vehicles

static bool ActorCanSeePlayer(Actor a)
static float ActorDistanceToPlayer(Actor a)
static bool ActorsCanSeeEachOther(Actor a, Actor b)

Returns true if the two actors have direct line of sight to each other. Please note that only checks between actors of different teams are precalculated and fast. Using this method on actors of the same team is slower.

static float ActorsDistance(Actor a, Actor b)

Returns the distance between two actors. Please note that only checks between actors of different teams are precalculated and fast. Using this method on actors of the same team is slower. If the value is not available, returns -1.

static array<Actor> ActorsInRange(Vector3 point, float range)
static array<Actor> AliveActorsInRange(Vector3 point, float range)
static Actor CreateAIActor(Team team)

Create a new AI Actor on the specified team. Use Actor.SpawnAt(...) to spawn the actor in the world.

static bool Explode(ExplosionInfo info)

Triggers an explosion. Returns true if anything (Actor/Vehicle) was damaged.

static array<Actor> GetActorsOnTeam(Team team)
static array<Actor> GetAliveActorsOnTeam(Team team)
static array<CapturePoint> GetCapturePointsOwnedByTeam(Team team)
static int GetNumberOfBotsInTeam(Team team)
static Actor GetSpawnableAIActor(Team team)

Get an AI Actor available for spawning on the specified team. Use Actor.SpawnAt(...) to spawn the actor in the world. If all ai actors on the team are alive, a new one will be created and returned.

static array<SpawnPoint> GetSpawnPointsOwnedByTeam(Team team)
static array<Squad> GetSquadsOnTeam(Team team)
static ActorSkin GetTeamSkin(Team team)

Returns the team skin of the specified team.

static bool IsTeamDead(Team team)

Returns true if all actors on the team are dead.

static void PlayerTakeOverBot(Actor actor)

Assume control over the target Actor. If the Player already controls a player actor, the player actor is first silently killed. The bot actor is also silently killed.

static SpawnPoint RandomEnemySpawnPoint(Team team)
static SpawnPoint RandomFrontlineSpawnPointForTeam(Team team)
static SpawnPoint RandomSpawnPoint()
static SpawnPoint RandomSpawnPointForTeam(Team team)
static void SetTeamSkin(Team team, ActorSkin skin)

Sets the team skin of all actors on the specified team. Team skins are game-managed, meaning that glow is automatically applied when the player enters night vision mode.

static bool TeamHasAnySpawnPoint(Team team)
static array<Vehicle> VehiclesInRange(Vector3 point, float range)