I love the smell of UnrealEd crashing in the morning. – tarquin

UE3:GameCrowdAgentBehavior (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> GameCrowdAgentBehavior
Package: 
GameFramework
Direct subclasses:
GameCrowdBehavior_PlayAnimation, GameCrowdBehavior_RunFromPanic, GameCrowdBehavior_WaitForGroup, GameCrowdBehavior_WaitInQueue


Properties

Property group 'GameCrowdAgentBehavior'

bFaceActionTargetFirst

Type: bool

If true, must face action target before starting behavior

bIdleBehavior

Type: bool

If true, agent should idle (not move between destinations)/

bIsViralBehavior

Type: bool

If true, pass on to agents encountered

MaxPlayerDistance

Type: float

Agent must be within this distance of the player to perform this behavior

Default value: 10000.0

Internal variables

ActionTarget

Type: Actor

actor to aim at during actions

bIsPanicked

Type: bool

true when agent is currently panicked

MyAgent

Type: GameCrowdAgent

Agent currently implementing this behavior instance

Functions

Native functions

HandleMovement

native function bool HandleMovement ()

Handles movement destination updating for agent.

Returns:

true if destination updating was handled

ShouldEndIdle

native function bool ShouldEndIdle ()

Called every tick when agent is currently idle (because bIdleBehavior is true)

Returns:

true if should end idle (bIdleBehavior should also become false)

Tick

native function Tick (float DeltaTime)

Agent's current behavior gets ticked

Events

FinishedTargetRotation

event FinishedTargetRotation ()

Event when agent is facing action target, called if bFaceActionTarget=true

OnAnimEnd

event OnAnimEnd (AnimNodeSequence SeqNode, float PlayedTime, float ExcessTime)

Anim end notification called by GameCrowdAgent.OnAnimEnd().

PropagateViralBehaviorTo

event PropagateViralBehaviorTo (GameCrowdAgent OtherAgent)

When two agents encounter each other, and one has a viral behavior and the other doesn't, the viral behavior is called to have a chance to propagate itself to the uninfected OtherAgent.

Other instance functions

ActivatedBy

function ActivatedBy (Actor NewActionTarget)

Called if agent wants to provide an action target to its behavior.

AllowBehaviorAt

function bool AllowBehaviorAt (GameCrowdDestination Destination)

return true if get kismet or new behavior from this destination

AllowThisDestination

function bool AllowThisDestination (GameCrowdDestination Destination)

Return true if agent is allowed to go to destination while performing this behavior

CanBeUsedBy

function bool CanBeUsedBy (GameCrowdAgent Agent, Object.Vector CameraLoc)

This function is called on an archetype - do not modify any properties here!

ChangingDestination

function ChangingDestination (GameCrowdDestination NewDest)

Notification that MyAgent is changing destinations

GetBehaviorString

function string GetBehaviorString ()

Get debug string about agent behavior

GetDestinationActor

function Actor GetDestinationActor ()

Returns action agent wants behavior to be moving toward.

InitBehavior

function InitBehavior (GameCrowdAgent Agent)

Called when Agent activates this behavior

StopBehavior

function StopBehavior ()

Called when Agent stops this behavior