Any NPCs · Documentation
Weather, Night and Engine Noise
Environment sources tell NPCs about the world beyond roads and traffic: Any Weather's rain, hour and thunder, and the engines of Any Car Engine. Add them on each placed manager.
← All Any NPCs documentation1 · Environment sources
Two sources, one list
Select the manager in the level, find Environment Sources in the Details panel, click + and pick a source in the new entry:
▾ AnyNpcManager > Environment Sources
Without the Weather source, NPCs ignore rain and the crowd stays at full size day and night. Without Engine Noise, engines make no difference to them. Each source has its own settings: expand the entry to see them.
2 · Rain
Umbrellas, hurrying and shelters
When rain or snow rises above Rain Threshold (AnyNpcManager > Simulation Settings > Weather, default 0.2), each NPC responds once:
- With its type's Umbrella Chance (default 50%) it opens an umbrella and walks on.
- Otherwise it hurries and, with its type's Shelter Chance (default 60%), walks to the sidewalk point next to the nearest enabled Any Weather shelter volume within 60 m, steps aside and waits there until the rain stops.
- NPCs spawned during the rain respond straight away. Everyone relaxes when the rain drops below half the threshold.
To give them somewhere to go, place an Any Weather Shelter Volume over a sidewalk: a bus stop, an awning or an arcade. The demo's bus stop is a shelter volume under a simple roof.
Bring your own umbrella. No umbrella mesh is included. Set an Umbrella Mesh on the NPC type, with its pivot at the grip, or NPCs that open one show nothing. An arm pose for holding it goes in your Animation Blueprint, using Umbrella Open.
▾ Weather (Any Weather)
3 · Night and rain
Fewer people at night and in the rain
With the Weather source, the manager reads the hour from Any Weather and scales Max Npcs by it:
▾ AnyNpcManager > Density
The manager spawns toward the lower target and removes the surplus, so the streets thin out as evening comes and fill again in the morning. Clear the curve for a full crowd at every hour.
4 · Engine noise
Revving engines and backfires
With the Engine Noise source, every Any Car Engine sound component in the level, the player's car included, becomes a source of Loud Noise:
▾ Engine Noise (Any Car Engine)
Each NPC in range draws from its type's Loud Noise weights: by default most carry on, some stop and look, and a few run.
Next: hook NPCs into your game with events, gunshots and damage, and size the crowd for your project.