The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:AIController (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site

Jump to: navigation, search
UDK Object >> Actor >> Controller >> AIController

Contents

Package: 
Engine
Implemented interfaces
Interface_NavigationHandle
Direct subclasses:
GameAIController, UTBot
This class in other games:
U2, U2XMP, UE2Runtime, UT2003, UT2004, UT3

AIController, the base class of AI.

Controllers are non-physical actors that can be attached to a pawn to control its actions. AIControllers implement the artificial intelligence for the pawns they control.

[edit] Properties

[edit] bAdjustFromWalls

Type: bool

auto-adjust around corners, with no hitwall notification for controller or pawn if wall is hit during a MoveTo() or MoveToward() latent execution.

Default value: True

[edit] bReverseScriptedRoute

Type: bool

if true, we're following the scripted route in reverse

[edit] ScriptedFocus

Type: Actor

view focus from last scripted action

[edit] ScriptedMoveTarget

Type: Actor

Move target from last scripted action

[edit] ScriptedRoute

Type: Route

Route from last scripted action; if valid, sets ScriptedMoveTarget with the points along the route

[edit] ScriptedRouteIndex

Type: int

if ScriptedRoute is valid, the index of the current point we're moving to

[edit] Skill

Type: float

skill, scaled by game difficulty (add difficulty to this value)

[edit] Default values

Property Value
bCanDoSpecial True
MinHitWall -0.5

[edit] Subobjects

[edit] Sprite

Class: Engine.SpriteComponent

Inherits from: Controller.Sprite

Property Value
ReplacementPrimitive None

[edit] Functions

[edit] Events

[edit] GetPlayerViewPoint

simulated event GetPlayerViewPoint (out Object.Vector out_Location, out Object.Rotator out_Rotation)

Overrides: Controller.GetPlayerViewPoint

(Description copied from Controller.GetPlayerViewPoint)
Returns Player's Point of View For the AI this means the Pawn's 'Eyes' ViewPoint For a Human player, this means the Camera's ViewPoint

Output: out_rotation, view rotation of player

[edit] NotifyPathChanged

event NotifyPathChanged ()

Specified by: Interface_NavigationHandle.NotifyPathChanged


[edit] PreBeginPlay

event PreBeginPlay ()

Overrides: Actor.PreBeginPlay


[edit] Reset

event Reset ()

Overrides: Controller.Reset


[edit] SetTeam

event SetTeam (int inTeamIdx)


[edit] Other instance functions

[edit] CanFireWeapon

function bool CanFireWeapon (Weapon Wpn, byte FireModeNum)


[edit] DisplayDebug

simulated function DisplayDebug (HUD HUD, out float out_YL, out float out_YPos)

Overrides: Controller.DisplayDebug

list important AIController variables on canvas. HUD will call DisplayDebug() on the current ViewTarget when the ShowDebug exec is used

Parameters:

  • HUD - HUD with canvas to draw on
  • out_YL - Height of the current font
  • out_YPos - Y position on Canvas. out_YPos += out_YL, gives position to draw text for next debug line.

[edit] GetOrderObject

function Actor GetOrderObject ()


[edit] GetOrders

function name GetOrders ()


[edit] NotifyWeaponFinishedFiring

function NotifyWeaponFinishedFiring (Weapon W, byte FireMode)


[edit] NotifyWeaponFired

function NotifyWeaponFired (Weapon W, byte FireMode)


[edit] OnAIMoveToActor

function OnAIMoveToActor (SeqAct_AIMoveToActor Action)

Scripting hook to move this AI to a specific actor.

[edit] PriorityObjective

function bool PriorityObjective ()


[edit] SetOrders

function SetOrders (name NewOrders, Controller OrderGiver)


[edit] ShouldRefire

function bool ShouldRefire ()


[edit] States

[edit] ScriptedMove

Simple scripted movement state, attempts to pathfind to ScriptedMoveTarget and returns execution to previous state upon either success/failure.

[edit] ScriptedMove.PoppedState

event PoppedState ()

Overrides: Object.PoppedState (global)

Called immediately in the current state that is being popped off of the state stack, before the new state is activated.

[edit] ScriptedMove.PushedState

event PushedState ()

Overrides: Object.PushedState (global)

Called immediately in the new state that was pushed onto the state stack, before any state code is executed.

[edit] ScriptedRouteMove

[edit] ScriptedRouteMove.PoppedState

event PoppedState ()

Overrides: Object.PoppedState (global)

Called immediately in the current state that is being popped off of the state stack, before the new state is activated.

Personal tools