Mostly Harmless
UE3:GameCrowdAgent (UDK)
Object >> Actor >> CrowdAgentBase >> GameCrowdAgent |
Contents
- 1 Properties
- 2 Enums
- 3 Structs
- 4 Functions
- 4.1 Native functions
- 4.2 Events
- 4.2.1 ActivateBehavior
- 4.2.2 Destroyed
- 4.2.3 FellOutOfWorld
- 4.2.4 FireDeathEvent
- 4.2.5 GeneratePathToActor
- 4.2.6 HandlePotentialAgentEncounter
- 4.2.7 InitNavigationHandle
- 4.2.8 KillAgent
- 4.2.9 NotifySeePlayer
- 4.2.10 OverlappedActorEvent
- 4.2.11 PlayIdleAnimation
- 4.2.12 PostBeginPlay
- 4.2.13 PostRenderFor
- 4.2.14 SetCurrentDestination
- 4.2.15 StopBehavior
- 4.2.16 StopIdleAnimation
- 4.2.17 TakeDamage
- 4.2.18 UpdateIntermediatePoint
- 4.2.19 WaitForGroupMembers
- 4.3 Other instance functions
- 4.3.1 ActivateInstancedBehavior
- 4.3.2 CalcCamera
- 4.3.3 DisplayDebug
- 4.3.4 GetBehaviorString
- 4.3.5 GetDestString
- 4.3.6 InitializeAgent
- 4.3.7 OnPlayAgentAnimation
- 4.3.8 PickBehaviorFrom
- 4.3.9 PlaySpawnBehavior
- 4.3.10 ResetPooledAgent
- 4.3.11 ResetSeePlayer
- 4.3.12 SetLighting
- 4.3.13 SetMaxSpeed
- 4.3.14 SetPanic
- 4.3.15 TryRandomBehavior
- 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[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
[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]
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
Functions[edit]
Native functions[edit]
IsIdle[edit]
Returns:
- true if CurrentBehavior and CurrentBehavior.bIdleBehavior is true
IsPanicked[edit]
Returns:
- whether this agent is panicked (true if agent has a CurrentBehavior and CurrentBehavior.bIsPanicked==true
NativePostRenderFor[edit]
Overrides: Actor.NativePostRenderFor
Hook to allow actors to render HUD overlays for themselves. Assumes that appropriate font has already been set
PlayDeath[edit]
Stop agent moving and pay death anim
SetCurrentBehavior[edit]
Instantiate a new behavior using BehaviorArchetype, and set it to be the current behavior.
Events[edit]
ActivateBehavior[edit]
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]
Overrides: Actor.Destroyed
FellOutOfWorld[edit]
Overrides: Actor.FellOutOfWorld
called when the actor falls out of the world 'safely' (below KillZ and such)
FireDeathEvent[edit]
Death event is script class, so need to call from script
GeneratePathToActor[edit]
Generate a path to Goal on behalf of the QueryingAgent
HandlePotentialAgentEncounter[edit]
Called when agent encounters another agent
NearbyDynamics list has been updated with agents, and potential encounters have their bPotentialEncounter set to true
[edit]
spawn and init Navigation Handle
KillAgent[edit]
Kill this agent or add it to population manager's spawn pool
NotifySeePlayer[edit]
Called when see PC's pawn where PC is a local playercontroller, Notification only occurs if bHasSeePlayerKismet=true
OverlappedActorEvent[edit]
Called when crowd agent overlaps something in the ReportOverlapsWithClass list
PlayIdleAnimation[edit]
Play a looping idle animation
PostBeginPlay[edit]
Overrides: Actor.PostBeginPlay
PostRenderFor[edit]
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]
StopBehavior[edit]
StopIdleAnimation[edit]
TakeDamage[edit]
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]
Update current intermediate destination point for agent in route to DestinationActor
WaitForGroupMembers[edit]
Too far ahead of group, pick waiting behavior
Other instance functions[edit]
ActivateInstancedBehavior[edit]
Activate a new behavior that has already been instantiated
CalcCamera[edit]
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]
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]
Get debug string about agent behavior
GetDestString[edit]
Get debug string about agent destination and movement status
InitializeAgent[edit]
Initialize agent archetype, group, destination, and behavior
OnPlayAgentAnimation[edit]
PickBehaviorFrom[edit]
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]
Called when agent spawns and has SpawnBehaviors set
ResetPooledAgent[edit]
Agent is coming out of pool, so rev him up
ResetSeePlayer[edit]
SetLighting[edit]
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]
Set maximum movement speed
SetPanic[edit]
TryRandomBehavior[edit]
Called when random behavior timer expires
If not currently in behavior AND player can see me, do a random behavior.