UE3:GameCrowdAgent (UDK)
Object >> Actor >> CrowdAgentBase >> GameCrowdAgent |
- Package:
- GameFramework
- Implemented interfaces:
- Interface_NavigationHandle
- Direct subclass:
- GameCrowdAgentSkeletal
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Properties
Property group 'Behavior'
DeadBodyDuration
Type: float
How long dead body stays around
Default value: 10.0
DesiredGroupRadius
Type: float
Try to keep Members this close together - probably will be obsolete when have formations
Default value: 200.0
EncounterAgentBehaviors
Type: array<BehaviorEntry>
Behaviors to choose from when encounter another agent (only if no current behavior)
GroupWaitingBehaviors
Type: array<BehaviorEntry>
Behaviors to choose from when waiting for other group members.
PanicBehaviors
Type: array<BehaviorEntry>
Behaviors to choose from when agent panicks.
RandomBehaviorInterval
Type: float
Average time between random behavior attempt (only if visible to player and no current behavior)
Default value: 30.0
RandomBehaviors
Type: array<BehaviorEntry>
Behaviors to choose from randomly at RandomBehaviorInterval.
SeePlayerBehaviors
Type: array<BehaviorEntry>
Behaviors to choose from when see player (only if no current behavior)
SeePlayerInterval
Type: float
How often see player event can be triggered. If 0, never retriggers
SpawnBehaviors
Type: array<BehaviorEntry>
Behaviors to choose from when agent spawns.
Property group 'GameCrowdAgent'
AmbientSoundCue
Type: SoundCue
Ambient Sound cue played by this agent
bPreferVisibleDestination
Type: bool
If true, agent will prefer destinations with line of sight to player if starting from non-L.O.S. destination
bPreferVisibleDestinationOnSpawn
Type: bool
If true, prefer visible destination only for first destination chosen after spawn
Default value: True
Health
Type: int
Current health of agent
Default value: 100
Property group 'LOD'
MaxLOSLifeDistance
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
Type: float
how long to wait before killing this agent when it isn't visible
Default value: 5.5
NotVisibleTickScalingFactor
Type: float
Scaling factor for agent ticking when not visible
Default value: 0.02
ProximityLODDist
Type: float
Distance to LOD out proximity checks for non-visible agents
Default value: 2000.0
VisibleProximityLODDist
Type: float
Distance to LOD out proximity checks for visible agents
Default value: 5000.0
Property group 'Movement'
bAllowPitching
Type: bool
bClampMovementSpeed
Type: bool
Whether to clamp movement speed
Default value: True
ConformTraceDist
Type: float
How far to trace to conform agent to the bsp/world.
Default value: 35.0
ConformTraceInterval
Type: int
Every how many frames the ground conforming line check is done.
Default value: 10
ConformType
Type: EConformType
How agent conforms to surfaces
MaxRunningSpeed
Type: float
Max running speed (if not using root motion velocity)
Default value: 300.0
MaxWalkingSpeed
Type: float
Max walking speed (if not using root motion velocity)
Default value: 100.0
MaxYawRate
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
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
Type: float
Agent velocity damping (friction).
Default value: 0.0010
Property group 'Pathing'
AvoidOtherRadius
Type: float
The radius used to check overlap between agents (basically how big an agent is).
Default value: 100.0
AvoidOtherStrength
Type: float
How hard agents are pushed apart when they overlap.
Default value: 1000.0
AvoidPlayerStrength
Type: float
How hard agents are pushed away from player.
Default value: 10000.0
AwareRadius
Type: float
Controls how far around an agent the system looks when finding the average speed.
Default value: 200.0
AwareUpdateInterval
Type: int
Every how many frames the agents 'awareness' is updated (attractors and other agents
Default value: 30
bCheckForObstacles
Type: bool
Whether to have obstacle mesh block agents
Type: bool
If TRUE, use navmesh for pathing
Default value: True
FollowPathStrength
Type: float
Agent acceleration along the path direction (towards their target).
Default value: 300.0
GroupAttractionStrength
Type: float
How hard group members pull together
Default value: 50.0
MatchVelStrength
Type: float
How aggressively an agent matches the speed of its neighbours.
Default value: 0.6
Property group 'Rendering'
GroundOffset
Type: float
Distance from ground to agent center (used to adjust foot positioning)
Default value: 40.0
MeshMaxScale3D
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
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
See GameCrowdAgent internal variables.
Default values
Subobjects
MyLightEnvironment
Class: Engine.DynamicLightEnvironmentComponent
Property | Value |
---|---|
bEnabled | False |
MinTimeBetweenFullUpdates | 2.0 |
Enums
EConformType
- CFM_NavMesh
- CFM_BSP
- CFM_World
- CFM_None
Structs
BehaviorEntry
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
Modifiers: native
Functions
Native functions
IsIdle
Returns:
- true if CurrentBehavior and CurrentBehavior.bIdleBehavior is true
IsPanicked
Returns:
- whether this agent is panicked (true if agent has a CurrentBehavior and CurrentBehavior.bIsPanicked==true
NativePostRenderFor
Overrides: Actor.NativePostRenderFor
Hook to allow actors to render HUD overlays for themselves. Assumes that appropriate font has already been set
PlayDeath
Stop agent moving and pay death anim
SetCurrentBehavior
Instantiate a new behavior using BehaviorArchetype, and set it to be the current behavior.
Events
ActivateBehavior
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
Overrides: Actor.Destroyed
FellOutOfWorld
Overrides: Actor.FellOutOfWorld
called when the actor falls out of the world 'safely' (below KillZ and such)
FireDeathEvent
Death event is script class, so need to call from script
GeneratePathToActor
Generate a path to Goal on behalf of the QueryingAgent
HandlePotentialAgentEncounter
Called when agent encounters another agent
NearbyDynamics list has been updated with agents, and potential encounters have their bPotentialEncounter set to true
spawn and init Navigation Handle
KillAgent
Kill this agent or add it to population manager's spawn pool
NotifySeePlayer
Called when see PC's pawn where PC is a local playercontroller, Notification only occurs if bHasSeePlayerKismet=true
OverlappedActorEvent
Called when crowd agent overlaps something in the ReportOverlapsWithClass list
PlayIdleAnimation
Play a looping idle animation
PostBeginPlay
Overrides: Actor.PostBeginPlay
PostRenderFor
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
StopBehavior
StopIdleAnimation
TakeDamage
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
Update current intermediate destination point for agent in route to DestinationActor
WaitForGroupMembers
Too far ahead of group, pick waiting behavior
Other instance functions
ActivateInstancedBehavior
Activate a new behavior that has already been instantiated
CalcCamera
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
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
Get debug string about agent behavior
GetDestString
Get debug string about agent destination and movement status
InitializeAgent
Initialize agent archetype, group, destination, and behavior
OnPlayAgentAnimation
PickBehaviorFrom
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
Called when agent spawns and has SpawnBehaviors set
ResetPooledAgent
Agent is coming out of pool, so rev him up
ResetSeePlayer
SetLighting
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
Set maximum movement speed
SetPanic
TryRandomBehavior
Called when random behavior timer expires
If not currently in behavior AND player can see me, do a random behavior.