Always snap to grid

Difference between revisions of "UE3:GameAIController (UDK)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Talk)
 
m (1 revision: class descriptions for UDK January update (part 2))
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
 
| parent4 = Object
 
| parent4 = Object
 
| interface1 = Interface_NavigationHandle
 
| interface1 = Interface_NavigationHandle
 +
| abstract = yes
 
}}
 
}}
 
{{autogenerated}}
 
{{autogenerated}}
Line 57: Line 58:
 
====AILogFile====
 
====AILogFile====
 
'''Type:''' {{cl|FileLog}}
 
'''Type:''' {{cl|FileLog}}
 +
 +
'''[[Variables#Modifiers|Modifiers]]:''' transient
  
 
Debug log file,
 
Debug log file,
Line 64: Line 67:
 
====bAIBroken====
 
====bAIBroken====
 
'''Type:''' [[bool]]
 
'''Type:''' [[bool]]
 +
 +
'''[[Variables#Modifiers|Modifiers]]:''' transient
  
 
<!-- enter variable description -->
 
<!-- enter variable description -->
Line 69: Line 74:
 
====bHasRunawayCommandList====
 
====bHasRunawayCommandList====
 
'''Type:''' [[bool]]
 
'''Type:''' [[bool]]
 +
 +
'''[[Variables#Modifiers|Modifiers]]:''' transient
  
 
Whether this AI has a runaway loop or not.  If it does we are going to do AbortCommand( CommandList ) at the end of Tick().  *
 
Whether this AI has a runaway loop or not.  If it does we are going to do AbortCommand( CommandList ) at the end of Tick().  *
Line 75: Line 82:
 
'''Type:''' {{cl|GameAICommand}}
 
'''Type:''' {{cl|GameAICommand}}
  
'''[[Variables#Modifiers|Modifiers]]:''' const
+
'''[[Variables#Modifiers|Modifiers]]:''' transient, const
  
 
Current command stack, with the last element being the currently active (ticked) one
 
Current command stack, with the last element being the currently active (ticked) one
 +
 +
====DemoActionString====
 +
'''Type:''' [[string]]
 +
 +
<!-- enter variable description -->
  
 
===Subobjects===
 
===Subobjects===
Line 124: Line 136:
  
 
<!-- enter function description -->
 
<!-- enter function description -->
 +
 +
====GetAICommandInStack====
 +
{{code|native function {{cl|GameAICommand}}&nbsp;'''GetAICommandInStack''' (const&nbsp;[[class]]<{{cl|GameAICommand}}>&nbsp;'''InClass''')}}
 +
 +
This will search the CommandList for the passed in command class. *
  
 
====PopCommand====
 
====PopCommand====
Line 137: Line 154:
 
{{code|native final function '''PushCommand''' ({{cl|GameAICommand}}&nbsp;'''NewCommand''')}}
 
{{code|native final function '''PushCommand''' ({{cl|GameAICommand}}&nbsp;'''NewCommand''')}}
  
PushCommand
+
<!-- enter function description -->
pushes a new AI command on top of the command stack
+
 
+
'''Parameters:'''
+
* ''NewCommand'' - command to place on top of stack
+
  
 
===Events===
 
===Events===
Line 165: Line 178:
 
====GeneratePathToLocation====
 
====GeneratePathToLocation====
 
{{code|event [[bool]]&nbsp;'''GeneratePathToLocation''' ({{tl|Vector|Object|structs}}&nbsp;'''Goal''', optional&nbsp;[[float]]&nbsp;'''WithinDistance''', optional&nbsp;[[bool]]&nbsp;'''bAllowPartialPath''')}}
 
{{code|event [[bool]]&nbsp;'''GeneratePathToLocation''' ({{tl|Vector|Object|structs}}&nbsp;'''Goal''', optional&nbsp;[[float]]&nbsp;'''WithinDistance''', optional&nbsp;[[bool]]&nbsp;'''bAllowPartialPath''')}}
 +
 +
<!-- enter event description -->
 +
 +
====GetActionString====
 +
{{code|simulated final event [[string]]&nbsp;'''GetActionString''' ()}}
  
 
<!-- enter event description -->
 
<!-- enter event description -->

Latest revision as of 06:39, 17 January 2010

UDK Object >> Actor >> Controller >> AIController >> GameAIController
Package: 
GameFramework
Implemented interfaces
Interface_NavigationHandle
Known classes within GameAIController:
GameAICommand


Properties[edit]

Property group 'Debug'[edit]

AILogFilter[edit]

Type: array<name>

Modifiers: config

List of categories to filter

bAIDrawDebug[edit]

Type: bool

Modifiers: config


bAILogging[edit]

Type: bool

Modifiers: config


bAILogToWindow[edit]

Type: bool

Modifiers: config


bFlushAILogEachLine[edit]

Type: bool

Modifiers: config


bMapBasedLogName[edit]

Type: bool

Modifiers: config


Internal variables[edit]

AILogFile[edit]

Type: FileLog

Modifiers: transient

Debug log file,

See: AILog

bAIBroken[edit]

Type: bool

Modifiers: transient


bHasRunawayCommandList[edit]

Type: bool

Modifiers: transient

Whether this AI has a runaway loop or not. If it does we are going to do AbortCommand( CommandList ) at the end of Tick(). *

CommandList[edit]

Type: GameAICommand

Modifiers: transient, const

Current command stack, with the last element being the currently active (ticked) one

DemoActionString[edit]

Type: string


Subobjects[edit]

Sprite[edit]

Class: Engine.SpriteComponent

Inherits from: AIController.Sprite

Property Value
ReplacementPrimitive None

Functions[edit]

Native functions[edit]

AbortCommand[edit]

native final function bool AbortCommand (GameAICommand AbortCmd, optional class<GameAICommandAbortClass)

AbortCommand Aborts a command (and all of its children)

Parameters:

  • AbortCmd - the command to abort (can be NULL, in which case AbortClass will be used to determine which command to abort
  • AbortClass - not used unless AbortCmd is NULL, in which case the first command int he stack of class 'AbortClass' will be aborted (and all its children)

CheckCommandCount[edit]

native final function CheckCommandCount ()

checks the command stack for too many commands and/or infinite recursion

DumpCommandStack[edit]

native final function DumpCommandStack ()


FindCommandOfClass[edit]

native noexport final function coerce GameAICommand FindCommandOfClass (class<GameAICommandSearchClass)

finds and returns the lowest command of the specified class on the stack (will return subclasses of the specified class)

GetActiveCommand[edit]

native final function GameAICommand GetActiveCommand ()


GetAICommandInStack[edit]

native function GameAICommand GetAICommandInStack (const class<GameAICommandInClass)

This will search the CommandList for the passed in command class. *

PopCommand[edit]

native final function PopCommand (GameAICommand ToBePoppedCommand)

PopCommand will pop the passed command (and everything above it in the stack)

Parameters:

  • ToBePoppedCommand - the command to pop

PushCommand[edit]

native final function PushCommand (GameAICommand NewCommand)


Events[edit]

AILog_Internal[edit]

event AILog_Internal (coerce string LogText, optional name LogCategory, optional bool bForce)


Destroyed[edit]

event Destroyed ()

Overrides: Controller.Destroyed

=[edit]

DEBUG

=[edit]

GeneratePathToActor[edit]

event bool GeneratePathToActor (Actor Goal, optional float WithinDistance, optional bool bAllowPartialPath)


GeneratePathToLocation[edit]

event bool GeneratePathToLocation (Object.Vector Goal, optional float WithinDistance, optional bool bAllowPartialPath)


GetActionString[edit]

simulated final event string GetActionString ()


Other instance functions[edit]

RecordDemoAILog[edit]

protected function RecordDemoAILog (coerce string LogText)


SetDesiredRotation[edit]

function SetDesiredRotation (Object.Rotator TargetDesiredRotation, bool InLockDesiredRotation, bool InUnlockWhenReached, float InterpolationTime)

SetDesiredRotation Calls Pawn's SetDesiredRotation: Simple interface to Pawn

States[edit]

DEBUGSTATE[edit]

=[edit]

DEBUG STATES

=[edit]

DEBUGSTATE.BeginState[edit]

event BeginState (name PreviousStateName)

Overrides: Object.BeginState (global)

Called immediately when entering a state, while within the GotoState() call that caused the state change (before any state code is executed).

DEBUGSTATE.ContinuedState[edit]

event ContinuedState ()

Overrides: Object.ContinuedState (global)

Called on the state that is no longer paused because of a PopState().

DEBUGSTATE.EndState[edit]

event EndState (name NextStateName)

Overrides: Object.EndState (global)

Called immediately before going out of the current state, while within the GotoState() call that caused the state change, and before BeginState() is called within the new state.

DEBUGSTATE.PausedState[edit]

event PausedState ()

Overrides: Object.PausedState (global)

Called on the state that is being paused because of a PushState().

DEBUGSTATE.PoppedState[edit]

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.

DEBUGSTATE.PushedState[edit]

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.