Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel
Difference between revisions of "Legacy:AIController"
From Unreal Wiki, The Unreal Engine Documentation Site
m |
(more subclasses) |
||
Line 4: | Line 4: | ||
==Properties == | ==Properties == | ||
− | ; bool bHunting : This is true if the controlled [[Legacy:Pawn|pawn]] is hunting another [[Legacy:Pawn|pawn]]. | + | ;bool bHunting : This is true if the controlled [[Legacy:Pawn|pawn]] is hunting another [[Legacy:Pawn|pawn]]. |
− | ; bool bAdjustFromWalls : | + | ;bool bAdjustFromWalls : auto-adjust around corners, with no hitwall notification for [[Legacy:Controller|controller]] or [[Legacy:Pawn|pawn]] (???) |
− | ; [[Legacy: | + | ;AIScript MyScript : If this [[Legacy:AIController|AIController]] is based on a script, the script is in this variable. |
− | ; float Skill : The skill of the AI. Generally, from 0 to 7. | + | ;float Skill : The skill of the AI. Generally, from 0 to 7. |
==Functions == | ==Functions == | ||
− | ; | + | ;native final latent function WaitToSeeEnemy() : returns when the [[Legacy:Pawn|pawn]] is looking directly at a visible enemy. |
− | ; bool WeaponFireAgain( float RefireRate, bool bFinishedFire ) : | + | ;function bool WeaponFireAgain(float RefireRate, bool bFinishedFire) : called by [[Legacy:Weapon|Weapon]]. Returns true if the weapon should fire. |
− | ; bool TriggerScript( | + | ;function bool TriggerScript(actor Other, pawn EventInstigator) : Any trigger is sent to this function, which in turn triggers MyScript if it exists. |
− | ; DisplayDebug( | + | ;function DisplayDebug(Canvas Canvas, out float YL, out float YPos) : If the "showdebug" console command is on, this is called to display debug information on the screen. |
− | ; float AdjustDesireFor( | + | ;function float AdjustDesireFor(Pickup P) : In subclasses, returns a float indicating how much the AI wants the [[Legacy:Pickup|Pickup]] P. In this class, it always returns 0. |
− | ; int GetFacingDirection() : | + | ;function int GetFacingDirection() : returns direction faced relative to movement dir, where 0 = forward, 16384 = right, 32768 = back, and 49152 = left |
− | ; AdjustView( float DeltaTime ) : | + | ;function AdjustView(float DeltaTime) : called if Controller's pawn is the viewtarget of a player |
− | ; SetOrders( name NewOrders, | + | ;function SetOrders(name NewOrders, Controller OrderGiver), function actor GetOrderObject(), function name GetOrders() : In subclasses, sets and gets info about the AI's orders, but in this class they don't do anything. |
− | + | ;event PrepareForMove(NavigationPoint Goal, ReachSpec Path) : Called if the reachspec doesn't support the pawn's current configuration. The code should tell the [[Legacy:Pawn|pawn]] what to do to deal with it (e.g. crouch). It's implemented in subclasses; here it doesn't do anything. | |
− | + | ;function WaitForMover(Mover M) : Sets up the AI to wait for Mover M to tell the AI that it has completed its move. Sets PendingMover. | |
− | ; | + | ;function MoverFinished() : Called by Mover when it finishes a move, and this pawn has the mover set as its PendingMover. |
− | ; MoverFinished() : Called by Mover when it finishes a move, and this pawn has the mover set as its PendingMover. | + | ;function UnderLift(Mover M) : called by mover when it hits a pawn with that mover as its pendingmover while moving to its destination. |
− | ; UnderLift( | + | ;function bool PriorityObjective() : This always returns false here. |
− | ; bool PriorityObjective() : This always returns false here. | + | ;function Startle(Actor A) : "Startles" the AI. Basically, this is a message to the AI to stop everything and re-evaluate its situation as soon as possible. Something calls this when the AI absolutely needs to know about it RIGHT NOW. |
− | ; Startle( | + | |
− | == | + | ==Subclasses == |
− | + | +-[[Legacy:AIController|AIController]] | |
− | + | +-[[Legacy:ScriptedController|ScriptedController]] | |
− | + | +-[[Legacy:Bot|Bot]] | |
− | + | | +-[[Legacy:XBot|xBot]] | |
− | + | | +-[[Legacy:InvasionBot|InvasionBot]] ''(Epic Bonuspack)'' | |
− | + | +-[[Legacy:MonsterController|MonsterController]] ''(Epic Bonuspack)'' | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | '' | + | |
− | + | ||
− | + |
Revision as of 07:21, 14 March 2003
This is the parent class of all AI-based controllers.
Properties
- bool bHunting
- This is true if the controlled pawn is hunting another pawn.
- bool bAdjustFromWalls
- auto-adjust around corners, with no hitwall notification for controller or pawn (???)
- AIScript MyScript
- If this AIController is based on a script, the script is in this variable.
- float Skill
- The skill of the AI. Generally, from 0 to 7.
Functions
- native final latent function WaitToSeeEnemy()
- returns when the pawn is looking directly at a visible enemy.
- function bool WeaponFireAgain(float RefireRate, bool bFinishedFire)
- called by Weapon. Returns true if the weapon should fire.
- function bool TriggerScript(actor Other, pawn EventInstigator)
- Any trigger is sent to this function, which in turn triggers MyScript if it exists.
- function DisplayDebug(Canvas Canvas, out float YL, out float YPos)
- If the "showdebug" console command is on, this is called to display debug information on the screen.
- function float AdjustDesireFor(Pickup P)
- In subclasses, returns a float indicating how much the AI wants the Pickup P. In this class, it always returns 0.
- function int GetFacingDirection()
- returns direction faced relative to movement dir, where 0 = forward, 16384 = right, 32768 = back, and 49152 = left
- function AdjustView(float DeltaTime)
- called if Controller's pawn is the viewtarget of a player
- function SetOrders(name NewOrders, Controller OrderGiver), function actor GetOrderObject(), function name GetOrders()
- In subclasses, sets and gets info about the AI's orders, but in this class they don't do anything.
- event PrepareForMove(NavigationPoint Goal, ReachSpec Path)
- Called if the reachspec doesn't support the pawn's current configuration. The code should tell the pawn what to do to deal with it (e.g. crouch). It's implemented in subclasses; here it doesn't do anything.
- function WaitForMover(Mover M)
- Sets up the AI to wait for Mover M to tell the AI that it has completed its move. Sets PendingMover.
- function MoverFinished()
- Called by Mover when it finishes a move, and this pawn has the mover set as its PendingMover.
- function UnderLift(Mover M)
- called by mover when it hits a pawn with that mover as its pendingmover while moving to its destination.
- function bool PriorityObjective()
- This always returns false here.
- function Startle(Actor A)
- "Startles" the AI. Basically, this is a message to the AI to stop everything and re-evaluate its situation as soon as possible. Something calls this when the AI absolutely needs to know about it RIGHT NOW.
Subclasses
+-AIController +-ScriptedController +-Bot | +-xBot | +-InvasionBot (Epic Bonuspack) +-MonsterController (Epic Bonuspack)