I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX
UE3:GameCrowdPopulationManager (UDK)
Contents
- 1 Properties
- 1.1 Property group 'GameCrowdPopulationManager'
- 1.2 Internal variables
- 1.2.1 AgentArchetypes
- 1.2.2 AgentCount
- 1.2.3 AgentFrequencySum
- 1.2.4 AgentLightingChannel
- 1.2.5 AgentPool
- 1.2.6 AgentWarmupTime
- 1.2.7 bCastShadows
- 1.2.8 bEnableCrowdLightEnvironment
- 1.2.9 bForceNavMeshPathing
- 1.2.10 bForceObstacleChecking
- 1.2.11 bHaveInitialPopulation
- 1.2.12 bSpawningActive
- 1.2.13 HeadVisibilityOffset
- 1.2.14 InitialPopulationPct
- 1.2.15 KilledCount
- 1.2.16 MaxAgentPoolSize
- 1.2.17 MaxSpawnDistSq
- 1.2.18 MinBehindSpawnDistSq
- 1.2.19 PlayerPositionPredictionTime
- 1.2.20 PoolCount
- 1.2.21 PotentialSpawnPoints
- 1.2.22 PrioritizationIndex
- 1.2.23 PrioritizationUpdateIndex
- 1.2.24 PrioritizedSpawnPoints
- 1.2.25 Remainder
- 1.2.26 SpawnedCount
- 1.2.27 SpawnNum
- 1.2.28 SpawnPrioritizationInterval
- 1.2.29 SpawnRate
- 1.2.30 SplitScreenNumReduction
- 1.3 Default values
- 2 Functions
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. |
Manages adding appropriate crowd population around player
Agents will be spawned/recycled at any available active GameCrowdDestination
Properties[edit]
Property group 'GameCrowdPopulationManager'[edit]
bWarmupPosition[edit]
Type: bool
If true, and initial spawn positiong is not in player's line of sight, and agent is not part of a group, agent will try to find an starting position at a random spot between the initial spawn positing and its initial destination that isn't in the player's line of sight.
Default value: True
Internal variables[edit]
AgentArchetypes[edit]
Type: array<SeqAct_GameCrowdSpawner.AgentArchetypeInfo>
Archetypes of agents spawned by this crowd spawner
AgentCount[edit]
Type: int
Number of currently spawned crowd members.
AgentFrequencySum[edit]
Type: float
Sum of agent types + frequency modifiers
AgentLightingChannel[edit]
Type: LightComponent.LightingChannelContainer
Lighting channels to put the agents in.
Default value:
Member | Value |
---|---|
bInitialized | True |
Crowd | True |
AgentPool[edit]
Type: array<GameCrowdAgent>
Pool of agents available for re-use: these are agents close to being removed
AgentWarmupTime[edit]
Type: float
Average time to "warm up" spawned agents before letting them sleep if not rendered
Default value: 2.0
bCastShadows[edit]
Type: bool
Whether agents from this spawner should cast shadows
bEnableCrowdLightEnvironment[edit]
Type: bool
Whether to enable the light environment on crowd members.
[edit]
Type: bool
If true, force nav mesh navigation for all agents from this spawner
bForceObstacleChecking[edit]
Type: bool
If true, force obstacle checking for all agents from this spawner
bHaveInitialPopulation[edit]
Type: bool
flag set when first adding agents. Extra fill on first tick
bSpawningActive[edit]
Type: bool
Controls whether we are actively spawning agents.
Default value: True
HeadVisibilityOffset[edit]
Type: float
Offset used to validate spawn by checking above spawn location to see if head/torso would be visible
Default value: 40.0
InitialPopulationPct[edit]
Type: float
How much population to add first tick
Default value: 0.2
KilledCount[edit]
Type: int
Agent spawning stats
MaxAgentPoolSize[edit]
Type: int
Maximum size of agent pool
Default value: 20
MaxSpawnDistSq[edit]
Type: float
Square of max distance allowed for spawns
Default value: 4.0E8
MinBehindSpawnDistSq[edit]
Type: float
Square of min distance allowed for in line of sight but out of view frustrum agent spawns
Default value: 2.5E7
PlayerPositionPredictionTime[edit]
Type: float
How far ahead to compute predicted player position for spawn prioritization
Default value: 5.0
PoolCount[edit]
Type: int
Agent spawning stats
PotentialSpawnPoints[edit]
Type: array<GameCrowdDestination>
List of all GameCrowdDestinations that are PotentialSpawnPoints
PrioritizationIndex[edit]
Type: int
Index into prioritization array for picking spawn points, incremented as agents are spawned at each point
PrioritizationUpdateIndex[edit]
Type: int
Index into prioritization array for updating prioritization
PrioritizedSpawnPoints[edit]
Type: array<GameCrowdDestination>
Ordered array of prioritized spawn GameCrowdDestinations
Remainder[edit]
Type: float
Used by spawning code to accumulate partial spawning
SpawnedCount[edit]
Type: int
Agent spawning stats
SpawnNum[edit]
Type: int
The maximum number of agents alive at one time. If agents are destroyed, more will spawn to meet this number.
Default value: 700
SpawnPrioritizationInterval[edit]
Type: float
How frequently to reprioritize GameCrowdDestinations as potential spawn points
Default value: 0.4
SpawnRate[edit]
Type: float
How many agents per second will be spawned at the target actor(s).
Default value: 50.0
SplitScreenNumReduction[edit]
Type: float
How much to reduce number by in splitscreen
Default value: 0.5
Default values[edit]
Property | Value |
---|---|
bHidden | True |
bOnlyDirtyReplication | True |
bSkipActorPropertyReplication | True |
CollisionType | COLLIDE_CustomDefault |
NetUpdateFrequency | 10.0 |
Functions[edit]
Events[edit]
PostBeginPlay[edit]
Overrides: Actor.PostBeginPlay
SpawnAgent[edit]
Actually create a new CrowdAgent actor, and initialise it
Tick[edit]
Overrides: Actor.Tick
FIXMESTEVE - Nativize?
Other instance functions[edit]
AddPrioritizedSpawnPoint[edit]
Prioritize passed in GameCrowdDestination and insert it into ordered PrioritizedSpawnPoints list, offset from current starting point
AddToAgentPool[edit]
Specified by: GameCrowdSpawnerInterface.AddToAgentPool
AgentDestroyed[edit]
Specified by: GameCrowdSpawnerInterface.AgentDestroyed
AnalyzeSpawnPoints[edit]
CreateNewAgent[edit]
Create new GameCrowdAgent and initialize it
DisplayDebug[edit]
Overrides: Actor.DisplayDebug
Use 'GameDebug' console command to show this debug info
Useful to show general debug info not tied to a particular concrete actor.
InitializeSpawnPoints[edit]
Fill PotentialSpawnPoints list. Once it is filled, initially fill PrioritizedSpawnPoints with visible points for first frame pop fill
OnGameCrowdPopulationManagerToggle[edit]
PickSpawnPoint[edit]
Returns:
- best spawn point to spawn next crowd agent
PrioritizeSpawnPoints[edit]
Prioritize GameCrowdDestinations as potential spawn points
ValidateSpawnAt[edit]
Determine whether candidate spawn point is currently valid