Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UDKBase.UDKBot

Extends
AIController
Modifiers
native

AI Controller that simulates the behavior of a human player Copyright 1998-2011 Epic Games, Inc. All Rights Reserved.

Core.Object
|   
+-- Engine.Actor
   |   
   +-- Engine.Controller
      |   
      +-- Engine.AIController
         |   
         +-- UDKBase.UDKBot

Direct Known Subclasses:

UTBot

Constants Summary
Inherited Contants from Engine.Controller
LATENT_MOVETOWARD

Variables Summary
intAcquisitionYawRate
floatAimUpdateFrequency
boolbAllowRouteReuse
floatBaseTrackingReactionTime
boolbEnemyAcquired
boolbEnemyInfoValid
boolbEnemyIsVisible
boolbExecutingWhatToDoNext
boolbForceRefreshRoute
boolbInDodgeMove
boolbJumpOverWall
boolbLeadTarget
pawnBlockedAimTarget
boolbNeedDelayedLeaveVehicle
boolbPlannedJump
boolbScriptSpecialJumpCost
boolbTargetAlternateLoc
boolbUsePreviousSquadRoute
boolbUsingSquadRoute
floatCurrentAimError
PawnCurrentlyTrackedEnemy
UDKAIDecisionComponentDecisionComponent
floatDodgeLandZ
floatDodgeToGoalPct
floatEnemyVisibilityTime
floatErrorUpdateFrequency
ActorFearSpots[2]
floatHearingThreshold
vectorImpactVelocity
floatLastAimUpdateTime
VehicleLastBlockingVehicle
floatLastErrorUpdateTime
floatLastIterativeCheck
vectorLastSeeingPos
vectorLastSeenPos
floatLastSeenTime
PawnMonitoredPawn
floatMonitorMaxDistSq
vectorMonitorStartLoc
floatMultiJumpZ
floatRespawnPredictionTime
array<EnemyPosition>SavedPositions
byteScriptedFireMode
UDKSquadAISquad
NavigationPointSquadRouteGoal
ActorTemporaryFocus
vectorTrackedVelocity
floatTrackingReactionTime
pawnVisibleEnemy
floatWarningDelay
ProjectileWarningProjectile
Inherited Variables from Engine.AIController
bAdjustFromWalls, bReverseScriptedRoute, ScriptedFocus, ScriptedMoveTarget, ScriptedRoute, ScriptedRouteIndex, Skill
Inherited Variables from Engine.Controller
AdjustPosition, bAdjusting, bAdvancedTactics, bAltFire, bCanDoSpecial, bFire, bForceStrafe, bGodMode, bIsPlayer, bLOSflag, bNotifyApex, bNotifyFallingHitWall, bNotifyPostLanded, bOverrideSearchStart, bPreciseDestination, bPreparingMove, bSeeFriendly, bSkipExtraLOSChecks, bSlowerZAcquire, bSoaking, bUsingPathLanes, CurrentPath, CurrentPathDir, DestinationPosition, Enemy, FailedMoveTarget, FailedReachLocation, FailedReachTime, FocalPosition, Focus, GoalList[4], GroundPitchTime, HighJumpNodeCostModifier, InUseNodeCostMultiplier, LaneOffset, LastFailedReach, LastRouteFind, MaxMoveTowardPawnTargetTime, MinHitWall, MoveFailureCount, MoveTarget, MoveTimer, NavigationHandle, NavigationHandleClass, NavMeshPath_SearchExtent_Modifier, NextController, NextRoutePath, OldBasedRotation, OverrideSearchStart, Pawn, PendingMover, PlayerNum, PlayerReplicationInfo, RouteCache, RouteDist, RouteGoal, ShotTarget, SightCounter, SightCounterInterval, StartSpot, ViewX, ViewY, ViewZ, VisiblePortals

Structures Summary
EnemyPosition
Position, Velocity, Time
Inherited Structures from Engine.Controller
VisiblePortalInfo

Functions Summary
eventfloat AdjustAimError (float TargetDist, bool bInstantProj)
function BuildSquadRoute ()
functionbool CanMakePathTo (Actor A)
event DelayedLeaveVehicle ()
event DelayedWarning ()
event ExecuteWhatToDoNext ()
functionActor FaceActor (float StrafingModifier)
functionactor FindBestInventoryPath (out float MinWeight)
functionActor FindBestSuperPickup (float MaxDist)
functionactor FindPathToSquadRoute (optional bool bWeightDetours)
function LatentWhatToDoNext ()
event MayDodgeToMoveTarget ()
event MissedDodge ()
event MonitoredPawnAlert ()
event ReceiveRunOverWarning (UDKVehicle V, float projSpeed, vector VehicleDir)
eventbool SpecialJumpCost (float RequiredJumpZ, out float Cost)
eventfloat SuperDesireability (PickupFactory P)
event TimeDJReset ()
function WaitToSeeEnemy ()
event WhatToDoNext ()
Inherited Functions from Engine.AIController
CanFireWeapon, DisplayDebug, GetPlayerViewPoint, NotifyWeaponFinishedFiring, NotifyWeaponFired, OnAIMoveToActor, PoppedState, PreBeginPlay, PushedState, Reset, SetTeam
Inherited Functions from Engine.Controller
ActorReachable, AllowDetourTo, BeginAnimControl, BeginState, BeyondFogDistance, CanSee, CanSeeByPoints, CleanupPRI, ClientSetLocation, ClientSetRotation, ClientSwitchToBestWeapon, CurrentLevelUnloaded, Destroyed, DisplayDebug, EndClimbLadder, EnemyJustTeleported, EnemyNotVisible, FindPathTo, FindPathToIntercept, FindPathToward, FindPathTowardNearest, FindRandomDest, FinishAnimControl, FinishRotation, FireWeaponAt, GameHasEnded, GamePlayEndedState, GeneratePathToActor, GeneratePathToLocation, GetActorEyesViewPoint, GetAdjustedAimFor, GetAdjustLocation, GetDestinationPosition, GetFocalPoint, GetHumanReadableName, GetPlayerViewPoint, GetTeamNum, HandlePathObstruction, HandlePickup, HearNoise, InitNavigationHandle, InitPlayerReplicationInfo, InLatentExecution, InstantWarnTarget, InterpolationFinished, InterpolationStarted, IsAimingAt, IsDead, IsInCombat, IsLocalPlayerController, IsSpectating, LandingShake, LineOfSightTo, LongFall, MayFall, MoverFinished, MoveTo, MoveToDirectNonPathPos, MoveToward, MoveUnreachable, NotifyAddInventory, NotifyBump, NotifyChangedWeapon, NotifyCoverAdjusted, NotifyCoverClaimViolation, NotifyCoverDisabled, NotifyFallingHitWall, NotifyHeadVolumeChange, NotifyHitWall, NotifyJumpApex, NotifyKilled, NotifyLanded, NotifyMissedJump, NotifyPathChanged, NotifyPhysicsVolumeChange, NotifyPostLanded, NotifyProjLanded, NotifyTakeHit, OnModifyHealth, OnPossess, OnSetPhysics, OnSetVelocity, OnTeleport, OnToggleGodMode, OnToggleHidden, PawnDied, PickTarget, PickWallAdjust, PlayActorFaceFXAnim, PointReachable, Possess, PostBeginPlay, RatePickup, ReachedPreciseDestination, ReadyForLift, ReceiveProjectileWarning, ReceiveWarning, ReplicatedEvent, Reset, Restart, RoundHasEnded, RouteCache_AddItem, RouteCache_Empty, RouteCache_InsertItem, RouteCache_RemoveIndex, RouteCache_RemoveItem, SeeMonster, SeePlayer, SendMessage, ServerGivePawn, ServerRestartPlayer, SetAdjustLocation, SetAnimPosition, SetCharacter, SetDestinationPosition, SetFocalPoint, SetMorphWeight, SetSkelControlScale, SetupSpecialPathAbilities, StopActorFaceFXAnim, StopFiring, StopLatentExecution, SwitchToBestWeapon, UnderLift, UnPossess, WaitForLanding, WaitForMover, WarnProjExplode


Variables Detail

AcquisitionYawRate Source code

var int AcquisitionYawRate;
The bot uses AcquisitionYawRate instead of RotationRate to track enemy before acquired.

AimUpdateFrequency Source code

var float AimUpdateFrequency;

bAllowRouteReuse Source code

var bool bAllowRouteReuse;
if true, when pathfinding to the same RouteGoal as the last time, use old RouteCache if it's still valid and all paths on it usable

BaseTrackingReactionTime Source code

var float BaseTrackingReactionTime;
How far back in time is bots model of enemy position based on

bEnemyAcquired Source code

var bool bEnemyAcquired;
bEnemyAcquired is true if the bot has been able to face the enemy directly. The bot has improved tracking after acquiring an enemy (uses AcquisitionYawRate instead of RotationRate to track enemy before acquired).

bEnemyInfoValid Source code

var bool bEnemyInfoValid;

bEnemyIsVisible Source code

var bool bEnemyIsVisible;

bExecutingWhatToDoNext Source code

var bool bExecutingWhatToDoNext;
set when in ExecuteWhatToDoNext() so we can detect bugs where it calls WhatToDoNext() again and causes decision-making to happen every tick

bForceRefreshRoute Source code

var bool bForceRefreshRoute;
used with route reuse to force the next route finding attempt to do the full path search

bInDodgeMove Source code

var bool bInDodgeMove;
bInDodgeMove is true if a bot is currently executing a dodge, and has not yet landed from it

bJumpOverWall Source code

var bool bJumpOverWall;

bLeadTarget Source code

var bool bLeadTarget;
Result of last enemy LineOfSightTo() check

BlockedAimTarget Source code

var pawn BlockedAimTarget;
Iterative aim correction in progress if set

bNeedDelayedLeaveVehicle Source code

var bool bNeedDelayedLeaveVehicle;
triggers the bot to call DelayedLeaveVehicle() during its next tick - used in the 'non-blocking' case of LeaveVehicle()

bPlannedJump Source code

var bool bPlannedJump;

bScriptSpecialJumpCost Source code

var bool bScriptSpecialJumpCost;
script flags that cause various events to be called to override C++ functionality

bTargetAlternateLoc Source code

var bool bTargetAlternateLoc;
if set pass bRequestAlternateLoc = TRUE to GetTargetLocation() when determining FocalPoint from Focus

bUsePreviousSquadRoute Source code

var bool bUsePreviousSquadRoute;
if true, this bot uses the SquadAI's PreviousObjectiveRouteCache instead (used when the route changes while bot is following it)

bUsingSquadRoute Source code

var bool bUsingSquadRoute;
whether bot is currently using the squad alternate route - if false, FindPathToSquadRoute() just calls FindPathToward(Squad.RouteObjective)

CurrentAimError Source code

var float CurrentAimError;
aim error value currently being used

CurrentlyTrackedEnemy Source code

var Pawn CurrentlyTrackedEnemy;
Normally the current enemy. Reset SavedPositions if this changes.

DecisionComponent Source code

var UDKAIDecisionComponent DecisionComponent;
component that handles delayed calls ExecuteWhatToDoNext() to when triggered

DodgeLandZ Source code

var float DodgeLandZ;
expected min landing height of dodge. Hint used by bots to track whether they are about to miss their planned landing spot (if bInDodgeMove is true).

DodgeToGoalPct Source code

var float DodgeToGoalPct;
Likelihood that MayDodgeToMoveTarget() event is called when starting MoveToGoal().

EnemyVisibilityTime Source code

var float EnemyVisibilityTime;

ErrorUpdateFrequency Source code

var float ErrorUpdateFrequency;
how often aim error is updated when bot has a visible enemy

FearSpots[2] Source code

var Actor FearSpots[2];
avoid these spots when moving - used for very short term stationary hazards like bio goo or sticky grenades.

HearingThreshold Source code

var float HearingThreshold;
distance at which bot will notice noises.

ImpactVelocity Source code

var vector ImpactVelocity;
velocity added while falling (bot tries to correct for it)

LastAimUpdateTime Source code

var float LastAimUpdateTime;
Last time tracking aim was updated

LastBlockingVehicle Source code

var Vehicle LastBlockingVehicle;
Last vehicle which blocked the path of this bot

LastErrorUpdateTime Source code

var float LastErrorUpdateTime;
last time aim error was updated

LastIterativeCheck Source code

var float LastIterativeCheck;
pct lead for last targeting check

LastSeeingPos Source code

var vector LastSeeingPos;

LastSeenPos Source code

var vector LastSeenPos;

LastSeenTime Source code

var float LastSeenTime;

MonitoredPawn Source code

var Pawn MonitoredPawn;

MonitorMaxDistSq Source code

var float MonitorMaxDistSq;

MonitorStartLoc Source code

var vector MonitorStartLoc;
for monitoring the position of a pawn. Will receive a MonitoredPawnAlert() event if the MonitoredPawn is killed or no longer possessed,

MultiJumpZ Source code

var float MultiJumpZ;
jump Z velocity bot can gain using multijumps (not counting first jump)

RespawnPredictionTime Source code

var float RespawnPredictionTime;
How long ahead to predict inventory respawns

SavedPositions Source code

var array<EnemyPosition> SavedPositions;
Position and velocity of enemy at previous ticks.

ScriptedFireMode Source code

var byte ScriptedFireMode;
if not 255, bot always uses this fire mode - for scripting bot actions

Squad Source code

var UDKSquadAI Squad;
Squad this bot is in. Squads share the same goal, and handle AI planning.

SquadRouteGoal Source code

var NavigationPoint SquadRouteGoal;
goal along squad's route, used when moving along alternate path via FindPathToSquadRoute()

TemporaryFocus Source code

var Actor TemporaryFocus;
temporarily look at this actor (for e.g. looking at shock ball for combos) - only used when looking at enemy

TrackedVelocity Source code

var vector TrackedVelocity;
Base value, modified by skill to set TrackingReactionTime

TrackingReactionTime Source code

var float TrackingReactionTime;
Enemy tracking - bots use this for targeting their current enemy. Bots actually aim at a position based that's predicted based on the target's position TrackingReactionTime ago, extrapolated using the target's velocity at that time. This means, for example, that if a target suddenly changes directions, bots will miss because they'll fire at where they thought he was going

VisibleEnemy Source code

var pawn VisibleEnemy;
When last enemy LineOfSightTo() check was done

WarningDelay Source code

var float WarningDelay;
delay before act on warning about being shot at by InstantWarnTarget() or ReceiveProjectileWarning()

WarningProjectile Source code

var Projectile WarningProjectile;
Projectile bot has been warned about and will react to (should set in ReceiveProjectileWarning())


Structures Detail

EnemyPosition Source code

struct EnemyPosition
{
var vector Position;
var float Time;
var vector Velocity;
};



Functions Detail

AdjustAimError Source code

event float AdjustAimError ( float TargetDist, bool bInstantProj )

BuildSquadRoute Source code

native final function BuildSquadRoute ( )
Called by squadleader. Fills the squad's ObjectiveRouteCache. Builds upon previous attempts by adding cost to the routes in the SquadAI's SquadRoutes array, up to a maximum of MaxSquadRoutes iterations.

CanMakePathTo Source code

native final function bool CanMakePathTo ( Actor A )
assumes valid CurrentPath, tries to see if CurrentPath can be combined with path to A

DelayedLeaveVehicle Source code

event DelayedLeaveVehicle ( )
called just before the AI's next tick if bNeedDelayedLeaveVehicle is true

DelayedWarning Source code

event DelayedWarning ( )

ExecuteWhatToDoNext Source code

protected event ExecuteWhatToDoNext ( )
entry point for AI decision making this gets executed during the physics tick so actions that could change the physics state (e.g. firing weapons) are not allowed

FaceActor Source code

function Actor FaceActor ( float StrafingModifier )
Used to determine which actor should be the focus of this bot (that he looks at while moving)

FindBestInventoryPath Source code

native final function actor FindBestInventoryPath ( out float MinWeight )
Searches the navigation network for a path that leads to nearby inventory pickups.

FindBestSuperPickup Source code

native function Actor FindBestSuperPickup ( float MaxDist )
Sets all available "super pickups" as possible destinations, and determines best one based on the value of and distance to the pickup (distance must be less than MaxDist). A super pickup is a PickupFactory with bIsSuperItem==true To be valid, it must be ready to pick up, or about to respawn (within this bot's RespawnPredictionTime) not blocked by a vehicle, and desireable to this bot (based on the SuperDesireability() event).

FindPathToSquadRoute Source code

native final function actor FindPathToSquadRoute ( optional bool bWeightDetours )
Returns shortest path to squad route (UTSquadAI.ObjectiveRouteCache), or next node along route if already on squad route

LatentWhatToDoNext Source code

native final latent function LatentWhatToDoNext ( )
encapsulates calling WhatToDoNext() and waiting for the tick-delayed decision making process to occur using UDKAIDecisionComponent

MayDodgeToMoveTarget Source code

event MayDodgeToMoveTarget ( )

MissedDodge Source code

event MissedDodge ( )
If DodgeLandZ (expected min landing height of dodge) is missed when bInDodgeMove is true, the MissedDodge() event is triggered.

MonitoredPawnAlert Source code

event MonitoredPawnAlert ( )
Will receive a MonitoredPawnAlert() event if the MonitoredPawn is killed or no longer possessed, or moves too far away from either MonitorStartLoc or the bot's position

ReceiveRunOverWarning Source code

event ReceiveRunOverWarning ( UDKVehicle V, float projSpeed, vector VehicleDir )
Warning from vehicle that bot is about to be run over.

SpecialJumpCost Source code

event bool SpecialJumpCost ( float RequiredJumpZ, out float Cost )
Called when bScriptSpecialJumpCost is true and the bot is considering a path to DestinationActor that requires a jump with JumpZ greater than the bot's normal capability, but less than MaxSpecialJumpZ calculates any additional distance that should be applied to this path to take into account preparation, etc
@return true to override the cost with the value in the Cost out param, false to use the default natively-calculated cost

SuperDesireability Source code

event float SuperDesireability ( PickupFactory P )

TimeDJReset Source code

event TimeDJReset ( )
If bot gets stuck trying to jump, then bCanDoubleJump is set false for the pawn Set a timer to reset the ability to double jump once the bot is clear.

WaitToSeeEnemy Source code

native final latent function WaitToSeeEnemy ( )
return when looking directly at visible enemy

WhatToDoNext Source code

event WhatToDoNext ( )
triggers ExecuteWhatToDoNext() to occur during the next tick this is also where logic that is unsafe to do during the physics tick should be added @note: in state code, you probably want LatentWhatToDoNext() so the state is paused while waiting for ExecuteWhatToDoNext() to be called


Defaultproperties

defaultproperties
{
	RotationRate=(Pitch=30000,Yaw=30000,Roll=2048)
	RemoteRole=ROLE_None

	Begin Object Class=UDKAIDecisionComponent Name=TheDecider
	End Object
	DecisionComponent=TheDecider
	Components.Add(TheDecider)

	AimUpdateFrequency=0.2
	LastIterativeCheck=1.0
	ErrorUpdateFrequency=0.45
	bLeadTarget=True

	AcquisitionYawRate=20000
	TrackingReactionTime=+0.25
	BaseTrackingReactionTime=+0.25
	bUsingSquadRoute=true
	bAllowRouteReuse=true
	HearingThreshold=2800.0
}


Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Creation time: ti 22-3-2011 19:56:58.134 - Created with UnCodeX