AiActorController

Members

Member

Description

alwaysChargeTarget

Charge towards target at all times.

canJoinPlayerSquad

While false, the player cannot issue a join squad order on this AI bot.

canSprint

currentAttackTarget

The target this AI is currently attacking

currentWaypoint

The current waypoint.

gameObject

hasPath

Returns true if the AI is traversing a path.

hasTargetVehicle

Returns true if the AI has a target vehicle to enter, or that they are already seated in.

ignoreFovCheck

Ignore FOV Check when querying sight.

isDefaultMovementOverridden

True if the built in AI movement is disabled.

isEnteringVehicle

Returns true if the AI has a target vehicle, and is currently attempting to enter it.

lastGotoPoint

The destination point of the last Goto() order.

lastWaypoint

The last reached path waypoint.

meleeChargeRange

The maximum range in meters at which the AI will attempt to charge an enemy.

skillLevel

targetFlightAltitude

The default altitude the AI will try to maintain in an Aircraft.

targetVehicle

Returns the target vehicle the AI is entering or is already seated in.

transform

Methods

Method

Description

CancelPath()

Stops the current AI path movement.

Goto(destination)

Pathfinds to the closest destination point on the current navmesh.

GotoAndEnterVehicle(vehicle)

Orders the AI to enter the specified vehicle. Also sets the AI’s target vehicle to the specified vehicle.

GotoDirect(destination)

Go straight to the destination point, ignoring pathfinding.

IsInFOV(targetActor)

Returns true if the targetActor is inside this actor’s field of view.

IsInFOV(position)

Returns true if the position is inside this actor’s field of view.

LeaveVehicle()

Leaves the target vehicle.

OverrideDefaultMovement()

Disables the built in AI movement, allowing full movement control from scripts.

ReleaseDefaultMovementOverride()

Re-enables the built in AI movement.

ToString()

Details

class AiActorController
bool alwaysChargeTarget

Charge towards target at all times. If set to true, this AI will always run towards an enemy target, even when it is out of melee range.

bool canJoinPlayerSquad

While false, the player cannot issue a join squad order on this AI bot.

bool canSprint
const Actor currentAttackTarget

The target this AI is currently attacking

const Vector3 currentWaypoint

The current waypoint.

const GameObject gameObject
const bool hasPath

Returns true if the AI is traversing a path.

const bool hasTargetVehicle

Returns true if the AI has a target vehicle to enter, or that they are already seated in.

bool ignoreFovCheck

Ignore FOV Check when querying sight. If set to true, this AI is able to see enemies all around, even behind.

const bool isDefaultMovementOverridden

True if the built in AI movement is disabled.

const bool isEnteringVehicle

Returns true if the AI has a target vehicle, and is currently attempting to enter it.

const Vector3 lastGotoPoint

The destination point of the last Goto() order.

const Vector3 lastWaypoint

The last reached path waypoint.

float meleeChargeRange

The maximum range in meters at which the AI will attempt to charge an enemy. Default is 30.

SkillLevel skillLevel
float targetFlightAltitude

The default altitude the AI will try to maintain in an Aircraft. This value is randomized every time a bot enters or exits an aircraft.

const Vehicle targetVehicle

Returns the target vehicle the AI is entering or is already seated in.

const Transform transform
void CancelPath()

Stops the current AI path movement.

void Goto(Vector3 destination)

Pathfinds to the closest destination point on the current navmesh.

void GotoAndEnterVehicle(Vehicle vehicle)

Orders the AI to enter the specified vehicle. Also sets the AI’s target vehicle to the specified vehicle.

void GotoDirect(Vector3 destination)

Go straight to the destination point, ignoring pathfinding.

bool IsInFOV(Actor targetActor)

Returns true if the targetActor is inside this actor’s field of view.

bool IsInFOV(Vector3 position)

Returns true if the position is inside this actor’s field of view.

void LeaveVehicle()

Leaves the target vehicle.

void OverrideDefaultMovement()

Disables the built in AI movement, allowing full movement control from scripts.

void ReleaseDefaultMovementOverride()

Re-enables the built in AI movement.

string ToString()