I'm a doctor, not a mechanic

UE3:UTSquadAI instance functions (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> Actor >> Info >> ReplicationInfo >> UTSquadAI (instance functions)

Contents

UTSquadAI instance functions in other games:
UDK

Instance functions

AcceptableDefensivePosition

function bool AcceptableDefensivePosition (NavigationPoint N, UTBot B)


AddBot

function AddBot (UTBot B)


AddEnemy

function bool AddEnemy (Pawn NewEnemy)


AddTransientCosts

function AddTransientCosts (UTBot B, float f)


AllowContinueOnFoot

function bool AllowContinueOnFoot (UTBot B, UTVehicle V)

Returns:

whether bot should continue along its path on foot or stay in its current vehicle

AllowDetourTo

function bool AllowDetourTo (UTBot B, NavigationPoint N)


AllowImpactJumpBy

function bool AllowImpactJumpBy (UTBot B)


AllowTaunt

function bool AllowTaunt (UTBot B)


AllowTranslocationBy

function bool AllowTranslocationBy (UTBot B)


AssessThreat

function float AssessThreat (UTBot B, Pawn NewThreat, bool bThreatVisible)


AssignSquadResponsibility

function bool AssignSquadResponsibility (UTBot B)


BeDevious

function bool BeDevious (Pawn Enemy)


BotEnteredVehicle

function BotEnteredVehicle (UTBot B)


BotSuitability

function float BotSuitability (UTBot B)


CheckHoverboard

function bool CheckHoverboard (UTBot B)


CheckSquadObjectives

function bool CheckSquadObjectives (UTBot B)


CheckSuperItem

function bool CheckSuperItem (UTBot B, float SuperDist)

checks for super pickups, important vehicles, etc within the specified path distance

CheckTowing

function bool CheckTowing (UTBot B, UTVehicle V)

considers giving bot actions to do with towing or being towed

Returns:

whether the bot was given something to do

CheckVehicle

function bool CheckVehicle (UTBot B)


ClearPathFor

function bool ClearPathFor (Controller C)


CloseEnoughToObjective

function bool CloseEnoughToObjective (UTBot B, Actor O)

returns whether the bot shouldn't get any closer to the given objective with the vehicle it's using

CloseToLeader

function bool CloseToLeader (Pawn P)


CriticalObjectiveWarning

function CriticalObjectiveWarning (Pawn NewEnemy)


DisplayDebug

simulated function DisplayDebug (HUD HUD, out float YL, out float YPos)

Overrides: Actor.DisplayDebug

(Description copied from Actor.DisplayDebug)
list important Actor 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.

EnterAndExitVehicle

function bool EnterAndExitVehicle (UTBot B)

used with bot's CustomAction interface to enter and exit a vehicle in the same action

FindDefensivePositionFor

function NavigationPoint FindDefensivePositionFor (UTBot B)


FindNewEnemyFor

function bool FindNewEnemyFor (UTBot B, bool bSeeEnemy)


FindPathToObjective

function bool FindPathToObjective (UTBot B, Actor O)


FormationCenter

function Actor FormationCenter (Controller C)


FriendlyToward

function bool FriendlyToward (Pawn Other)


GetFacingRotation

function Object.Rotator GetFacingRotation ()


GetLinkVehicle

function UTVehicle GetLinkVehicle (UTBot B)


GetMaxDefenseDistanceFrom

function float GetMaxDefenseDistanceFrom (Actor Center, UTBot B)

Returns:

the maximum distance a bot should be from the given Actor it wants to defend

GetOnHoverboard

function bool GetOnHoverboard (UTBot B)

used with bot's CustomAction interface to tell it to get on the hoverboard

GetOrders

function name GetOrders ()


GetOrderStringFor

simulated function string GetOrderStringFor (UTPlayerReplicationInfo PRI)


GetShortOrderStringFor

simulated function string GetShortOrderStringFor (UTPlayerReplicationInfo PRI)


GetSize

function int GetSize ()


GetStartObjective

function UTGameObjective GetStartObjective (UTBot B)

Returns:

the objective the given bot wants to spawn at

GetTowingDestination

function Actor GetTowingDestination (UTVehicle Towed)

Returns:

a good objective to tow the given Pawn to - if None is returned bot will just do its normal logic

GotoVehicle

function bool GotoVehicle (UTVehicle SquadVehicle, UTBot B)

tells the given bot to attempt to move toward and enter the given vehicle

HandlePathObstruction

function bool HandlePathObstruction (UTBot B, Actor BlockedBy)

called when a ReachSpec the given bot wants to use is blocked by a dynamic obstruction gives the AI an opportunity to do something to get rid of it instead of trying to find another path

Parameters:

  • B - the bot whose path is blocked
  • BlockedBy - the object blocking the path

Returns:

true if the AI did something about the obstruction and should use the path anyway, false if the path is unusable and the bot must find some other way to go

Note: MoveTarget is the actor the AI wants to move toward, CurrentPath the ReachSpec it wants to use

HasOtherVisibleEnemy

function bool HasOtherVisibleEnemy (UTBot B)

Returns:

whether the given bot knows of some visible enemy that is not its current enemy

Initialize

function Initialize (UTTeamInfo T, UTGameObjective O, Controller C)


IsDefending

function bool IsDefending (UTBot B)


IsOnPathToSquadObjective

function bool IsOnPathToSquadObjective (Actor Goal)

returns whether the bot should be considered as moving towards SquadObjective if its goal is the given Actor

IsOnSquad

function bool IsOnSquad (Controller C)


LeaveVehicleAtParkingSpot

function LeaveVehicleAtParkingSpot (UTBot B, Actor O)

called when the bot is trying to get to the given objective and has reached one of its parking spots

LeaveVehicleToReachObjective

function bool LeaveVehicleToReachObjective (UTBot B, Actor O)

checks if the bot's vehicle is close enough to leave and proceed on foot (assumes the objective cannot be completed while inside a vehicle)

Returns:

true if the bot left the vehicle and is continuing on foot, false if it did nothing

LostEnemy

function bool LostEnemy (UTBot B)


MarkHuntingSpots

function MarkHuntingSpots (UTBot B)

called when the given bot is hunting - gives the squad an opportunity to evaluate more accessible NavigationPoints for attacking the bot's Enemy than pathing towards it (e.g. sniper spots)

MaxVehicleDist

function float MaxVehicleDist (Pawn P)


MergeWith

function MergeWith (UTSquadAI S)


ModifyAggression

function ModifyAggression (UTBot B, out float Aggression)

gives Squad a chance to modify how aggressively the bot chases down enemies

ModifyThreat

function float ModifyThreat (float current, Pawn NewThreat, bool bThreatVisible, UTBot B)


MustCompleteOnFoot

function bool MustCompleteOnFoot (Actor O, optional Pawn P)

returns whether bot must be on foot to use the given objective (if so, bot will get out of any vehicle just before reaching it)

MustKeepEnemy

function bool MustKeepEnemy (Pawn E)


NearFormationCenter

function bool NearFormationCenter (Pawn P)


NeverBail

function bool NeverBail (Pawn P)

Returns:

whether bot should bail on a vehicle that has low health or is stuck

NotifyKilled

function NotifyKilled (Controller Killer, Controller Killed, Pawn KilledPawn)


OverrideFollowPlayer

function bool OverrideFollowPlayer (UTBot B)


PickBotToReassign

function UTBot PickBotToReassign ()


PickNewLeader

function PickNewLeader ()


PickRetreatDestination

function bool PickRetreatDestination (UTBot B)


PriorityObjective

function byte PriorityObjective (UTBot B)


RateDefensivePosition

function float RateDefensivePosition (NavigationPoint N, UTBot CurrentBot, Actor Center)


RemoveBot

function RemoveBot (UTBot B)


RemoveEnemy

function RemoveEnemy (Pawn E)


RemovePlayer

function RemovePlayer (PlayerController P)


Retask

function Retask (UTBot B)


SetAlternatePathTo

function SetAlternatePathTo (NavigationPoint NewRouteObjective, UTBot RouteMaker)


SetDefenseScriptFor

function SetDefenseScriptFor (UTBot B)


SetEnemy

function bool SetEnemy (UTBot B, Pawn NewEnemy)


SetFacingActor

function Actor SetFacingActor (UTBot B)


SetObjective

function SetObjective (UTGameObjective O, bool bForceUpdate)


ShouldCheckSuperVehicle

function bool ShouldCheckSuperVehicle (UTBot B)

Returns:

whether CheckSuperItem() should include vehicles

ShouldDeferTo

function bool ShouldDeferTo (Controller C)


ShouldDestroyTranslocator

function bool ShouldDestroyTranslocator (UTBot B)


ShouldSuppressEnemy

function bool ShouldSuppressEnemy (UTBot B)


ShouldUndeployVehicle

function bool ShouldUndeployVehicle (UTBot B)

if bot is in a deployed vehicle, consider undeploying it

Returns:

whether bot was given instructions

ShouldUseAlternatePaths

function bool ShouldUseAlternatePaths ()

returns whether bots should use an alternate squad route to reach SquadObjective instead of the shortest possible route

ShouldUseHoverboard

function bool ShouldUseHoverboard (UTBot B)


TellBotToFollow

function bool TellBotToFollow (UTBot B, Controller C)


TryToIntercept

function bool TryToIntercept (UTBot B, Pawn P, Actor RouteGoal)


UndeployVehicle

function bool UndeployVehicle (UTBot B)

used with bot's CustomAction interface to undeploy a vehicle

UnderFire

function bool UnderFire (Pawn NewThreat, UTBot Ignored)


ValidEnemy

function bool ValidEnemy (Pawn NewEnemy)


VehicleDesireability

function float VehicleDesireability (UTVehicle V, UTBot B)


WaitAtThisPosition

function bool WaitAtThisPosition (Pawn P)


WanderNearLeader

function bool WanderNearLeader (UTBot B)