Mostly Harmless

UE3:GameCrowdAgent (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
(Redirected from UE3:EConformType (UDK))
Jump to: navigation, search
UDK Object >> Actor >> CrowdAgentBase >> GameCrowdAgent

Contents

Package: 
GameFramework
Implemented interfaces
Interface_NavigationHandle
Direct subclass:
GameCrowdAgentSkeletal


Properties[edit]

Property group 'Behavior'[edit]

DeadBodyDuration[edit]

Type: float

How long dead body stays around

Default value: 10.0

DesiredGroupRadius[edit]

Type: float

Try to keep Members this close together - probably will be obsolete when have formations

Default value: 200.0

EncounterAgentBehaviors[edit]

Type: array<BehaviorEntry>

Behaviors to choose from when encounter another agent (only if no current behavior)

GroupWaitingBehaviors[edit]

Type: array<BehaviorEntry>

Behaviors to choose from when waiting for other group members.

PanicBehaviors[edit]

Type: array<BehaviorEntry>

Behaviors to choose from when agent panicks.

RandomBehaviorInterval[edit]

Type: float

Average time between random behavior attempt (only if visible to player and no current behavior)

Default value: 30.0

RandomBehaviors[edit]

Type: array<BehaviorEntry>

Behaviors to choose from randomly at RandomBehaviorInterval.

SeePlayerBehaviors[edit]

Type: array<BehaviorEntry>

Behaviors to choose from when see player (only if no current behavior)

SeePlayerInterval[edit]

Type: float

How often see player event can be triggered. If 0, never retriggers

SpawnBehaviors[edit]

Type: array<BehaviorEntry>

Behaviors to choose from when agent spawns.

Property group 'GameCrowdAgent'[edit]

AmbientSoundCue[edit]

Type: SoundCue

Ambient Sound cue played by this agent

bPreferVisibleDestination[edit]

Type: bool

If true, agent will prefer destinations with line of sight to player if starting from non-L.O.S. destination

bPreferVisibleDestinationOnSpawn[edit]

Type: bool

If true, prefer visible destination only for first destination chosen after spawn

Default value: True

Health[edit]

Type: int

Current health of agent

Default value: 100

Property group 'LOD'[edit]

MaxLOSLifeDistance[edit]

Type: float

Max distance to keep agents around if they haven't been rendered in NotVisibleLifeSpan, but are still in player's potential line of sight

Default value: 20000.0

NotVisibleLifeSpan[edit]

Type: float

how long to wait before killing this agent when it isn't visible

Default value: 5.5

NotVisibleTickScalingFactor[edit]

Type: float

Scaling factor for agent ticking when not visible

Default value: 0.02

ProximityLODDist[edit]

Type: float

Distance to LOD out proximity checks for non-visible agents

Default value: 2000.0

VisibleProximityLODDist[edit]

Type: float

Distance to LOD out proximity checks for visible agents

Default value: 5000.0

Property group 'Movement'[edit]

bAllowPitching[edit]

Type: bool


bClampMovementSpeed[edit]

Type: bool

Whether to clamp movement speed

Default value: True

ConformTraceDist[edit]

Type: float

How far to trace to conform agent to the bsp/world.

Default value: 35.0

ConformTraceInterval[edit]

Type: int

Every how many frames the ground conforming line check is done.

Default value: 10

ConformType[edit]

Type: EConformType

How agent conforms to surfaces

MaxRunningSpeed[edit]

Type: float

Max running speed (if not using root motion velocity)

Default value: 300.0

MaxWalkingSpeed[edit]

Type: float

Max walking speed (if not using root motion velocity)

Default value: 100.0

MaxYawRate[edit]

Type: float

Crowd agents rotate to face the direction they are travelling. This value limits how quickly they turn to do this, to avoid them spinning too quickly

Default value: 40000.0

RotateToTargetSpeed[edit]

Type: float

When a 'target' action occurs, agent will rotate to face the CrowdAttractor. This controls how fast that turn happens

Default value: 30000.0

VelocityDamping[edit]

Type: float

Agent velocity damping (friction).

Default value: 0.0010

Property group 'Pathing'[edit]

AvoidOtherRadius[edit]

Type: float

The radius used to check overlap between agents (basically how big an agent is).

Default value: 100.0

AvoidOtherStrength[edit]

Type: float

How hard agents are pushed apart when they overlap.

Default value: 1000.0

AvoidPlayerStrength[edit]

Type: float

How hard agents are pushed away from player.

Default value: 10000.0

AwareRadius[edit]

Type: float

Controls how far around an agent the system looks when finding the average speed.

Default value: 200.0

AwareUpdateInterval[edit]

Type: int

Every how many frames the agents 'awareness' is updated (attractors and other agents

Default value: 30

bCheckForObstacles[edit]

Type: bool

Whether to have obstacle mesh block agents

bUseNavMeshPathing[edit]

Type: bool

If TRUE, use navmesh for pathing

Default value: True

FollowPathStrength[edit]

Type: float

Agent acceleration along the path direction (towards their target).

Default value: 300.0

GroupAttractionStrength[edit]

Type: float

How hard group members pull together

Default value: 50.0

MatchVelStrength[edit]

Type: float

How aggressively an agent matches the speed of its neighbours.

Default value: 0.6

Property group 'Rendering'[edit]

GroundOffset[edit]

Type: float

Distance from ground to agent center (used to adjust foot positioning)

Default value: 40.0

MeshMaxScale3D[edit]

Type: Object.Vector

Max 3D drawscale to apply to the agent mesh

Default value:

Member Value
X 1.0
Y 1.0
Z 1.0

MeshMinScale3D[edit]

Type: Object.Vector

Min 3D drawscale to apply to the agent mesh

Default value:

Member Value
X 1.0
Y 1.0
Z 1.0

Internal variables[edit]

See GameCrowdAgent internal variables.

Default values[edit]

Property Value
bCollideActors True
bNoEncroachCheck True
bProjTarget True
Components[0] DynamicLightEnvironmentComponent'MyLightEnvironment'
Physics PHYS_Interpolating
SupportedEvents[4] Class'Engine.SeqEvent_TakeDamage'
SupportedEvents[5] Class'Engine.SeqEvent_Death'
TickGroup TG_DuringAsyncWork

Subobjects[edit]

MyLightEnvironment[edit]

Class: Engine.DynamicLightEnvironmentComponent

Property Value
bEnabled False
MinTimeBetweenFullUpdates 2.0

Enums[edit]

EConformType[edit]

CFM_NavMesh 
CFM_BSP 
CFM_World 
CFM_None 

Structs[edit]

BehaviorEntry[edit]

Modifiers: native

Describes a behavior type and its frequency

GameCrowdAgentBehavior BehaviorArchetype 
Archetype based on a GameCrowdAgentBehavior class
float BehaviorFrequency 
How often this behavior is picked = BehaviorFrequency/(sum of BehaviorFrequencies)
bool bNeverRepeat 
If true, agent will never repeat this behavior
bool bHasBeenUsed 
Whether this behavior has been used by this agent
bool bCanBeUsed 
Temp Cache whether this behavior can be used

Default values:

Property Value
BehaviorFrequency 1.0

RecentInteraction[edit]

Modifiers: native

name InteractionTag 
float InteractionDelay 

Functions[edit]

Native functions[edit]

IsIdle[edit]

native function bool IsIdle ()

Returns:

true if CurrentBehavior and CurrentBehavior.bIdleBehavior is true

IsPanicked[edit]

native function bool IsPanicked ()

Returns:

whether this agent is panicked (true if agent has a CurrentBehavior and CurrentBehavior.bIsPanicked==true

NativePostRenderFor[edit]

simulated native function NativePostRenderFor (PlayerController PC, Canvas Canvas, Object.Vector CameraPosition, Object.Vector CameraDir)

Overrides: Actor.NativePostRenderFor

Hook to allow actors to render HUD overlays for themselves. Assumes that appropriate font has already been set

PlayDeath[edit]

native function PlayDeath (Object.Vector KillMomentum)

Stop agent moving and pay death anim

SetCurrentBehavior[edit]

final native function SetCurrentBehavior (GameCrowdAgentBehavior BehaviorArchetype)

Instantiate a new behavior using BehaviorArchetype, and set it to be the current behavior.

Events[edit]

ActivateBehavior[edit]

event ActivateBehavior (GameCrowdAgentBehavior NewBehaviorArchetype)

Activate the passed in NewBehaviorArchetype as the new current behavior for this agent FIXMESTEVE - currently kills old behavior - instead, should have stack of behaviors

Destroyed[edit]

simulated event Destroyed ()

Overrides: Actor.Destroyed


FellOutOfWorld[edit]

simulated event FellOutOfWorld (class<DamageTypedmgType)

Overrides: Actor.FellOutOfWorld

called when the actor falls out of the world 'safely' (below KillZ and such)

FireDeathEvent[edit]

simulated event FireDeathEvent ()

Death event is script class, so need to call from script

GeneratePathToActor[edit]

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

Generate a path to Goal on behalf of the QueryingAgent

HandlePotentialAgentEncounter[edit]

event HandlePotentialAgentEncounter ()

Called when agent encounters another agent

NearbyDynamics list has been updated with agents, and potential encounters have their bPotentialEncounter set to true

InitNavigationHandle[edit]

event InitNavigationHandle ()

spawn and init Navigation Handle

KillAgent[edit]

event KillAgent ()

Kill this agent or add it to population manager's spawn pool

NotifySeePlayer[edit]

event NotifySeePlayer (PlayerController PC)

Called when see PC's pawn where PC is a local playercontroller, Notification only occurs if bHasSeePlayerKismet=true

OverlappedActorEvent[edit]

event OverlappedActorEvent (Actor A)

Called when crowd agent overlaps something in the ReportOverlapsWithClass list

PlayIdleAnimation[edit]

simulated event PlayIdleAnimation ()

Play a looping idle animation

PostBeginPlay[edit]

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


PostRenderFor[edit]

simulated event PostRenderFor (PlayerController PC, Canvas Canvas, Object.Vector CameraPosition, Object.Vector CameraDir)

Overrides: Actor.PostRenderFor

PostRenderFor() Hook to allow agents to render HUD overlays for themselves. Called only if the agent was rendered this tick. Assumes that appropriate font has already been set

SetCurrentDestination[edit]

event SetCurrentDestination (GameCrowdDestination NewDest)


StopBehavior[edit]

event StopBehavior ()


StopIdleAnimation[edit]

simulated event StopIdleAnimation ()


TakeDamage[edit]

event TakeDamage (int DamageAmount, Controller EventInstigator, Object.Vector HitLocation, Object.Vector Momentum, class<DamageTypeDamageType, optional Actor.TraceHitInfo HitInfo, optional Actor DamageCauser)

Overrides: Actor.TakeDamage

(Description copied from Actor.TakeDamage)
apply some amount of damage to this actor

Parameters:

  • DamageAmount - the base damage to apply
  • EventInstigator - the Controller responsible for the damage
  • HitLocation - world location where the hit occurred
  • Momentum - force caused by this hit
  • DamageType - class describing the damage that was done
  • HitInfo - additional info about where the hit occurred
  • DamageCauser - the Actor that directly caused the damage (i.e. the Projectile that exploded, the Weapon that fired, etc)

UpdateIntermediatePoint[edit]

event UpdateIntermediatePoint (optional Actor DestinationActor)

Update current intermediate destination point for agent in route to DestinationActor

WaitForGroupMembers[edit]

event WaitForGroupMembers ()

Too far ahead of group, pick waiting behavior

Other instance functions[edit]

ActivateInstancedBehavior[edit]

function ActivateInstancedBehavior (GameCrowdAgentBehavior NewBehaviorObject)

Activate a new behavior that has already been instantiated

CalcCamera[edit]

simulated function bool CalcCamera (float fDeltaTime, out Object.Vector out_CamLoc, out Object.Rotator out_CamRot, out float out_FOV)

Overrides: Actor.CalcCamera

Calculate camera view point, when viewing this actor.

Parameters:

  • fDeltaTime - delta time seconds since last update
  • out_CamLoc - Camera Location
  • out_CamRot - Camera Rotation
  • out_FOV - Field of View

Returns:

true if Actor should provide the camera point of view.

DisplayDebug[edit]

simulated function DisplayDebug (HUD HUD, out float out_YL, out float out_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.

GetBehaviorString[edit]

function string GetBehaviorString ()

Get debug string about agent behavior

GetDestString[edit]

function string GetDestString ()

Get debug string about agent destination and movement status

InitializeAgent[edit]

simulated function InitializeAgent (Actor SpawnLoc, GameCrowdAgent AgentTemplate, GameCrowdGroup NewGroup, float AgentWarmUpTime, bool bWarmupPosition, bool bCheckWarmupVisibility)

Initialize agent archetype, group, destination, and behavior

OnPlayAgentAnimation[edit]

simulated function OnPlayAgentAnimation (SeqAct_PlayAgentAnimation Action)


PickBehaviorFrom[edit]

function bool PickBehaviorFrom (array<BehaviorEntryBehaviorList, optional Object.Vector BestCameraLoc)

Pick a behavior from the BehaviorList, for a camera at BestCameraLoc, and activate this behavior Caller is responsible for setting bHasBeenUsed on picked behavior entry.

Returns:

true if new behavior was activated

PlaySpawnBehavior[edit]

function PlaySpawnBehavior ()

Called when agent spawns and has SpawnBehaviors set

ResetPooledAgent[edit]

function ResetPooledAgent ()

Agent is coming out of pool, so rev him up

ResetSeePlayer[edit]

function ResetSeePlayer ()


SetLighting[edit]

simulated function SetLighting (bool bEnableLightEnvironment, LightComponent.LightingChannelContainer AgentLightingChannel, bool bCastShadows)

Set agent lighting

Parameters:

  • bEnableLightEnvironment - controls whether light environment is enabled
  • AgentLightingChannel - is the lighting channel to use (GameCrowdAgentSkeletal only)
  • bCastShadows - controls whether agent casts shadows (GameCrowdAgentSkeletal only)

SetMaxSpeed[edit]

function SetMaxSpeed ()

Set maximum movement speed

SetPanic[edit]

function SetPanic (Actor PanicActor, bool bNewPanic)


TryRandomBehavior[edit]

function TryRandomBehavior ()

Called when random behavior timer expires

If not currently in behavior AND player can see me, do a random behavior.