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 documentation

1 · 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

Weather (Any Weather) Rain and snow, the hour of the day, shelter volumes and thunder, read from the level's Any Weather system
Engine Noise (Any Car Engine) Hard revs and backfires of every Any Car Engine sound component in the level

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)

Use Local Weather On by default: reads the weather at the camera, weather zones included, instead of the global weather
Use Shelter Volumes On by default: NPCs walk to shelter volumes when it rains
Shelter Refresh Interval How often to look for shelter volumes, as streamed levels add and remove them. Default 5 s
Thunder Scares On by default: each lightning strike is a Loud Noise to the NPCs around the camera
Thunder Radius How far around the camera the thunder is heard. Default 200 m

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

Density By Hour Share of Max Npcs for each hour. By default 15% at midnight, 8% at 3:00, 90% at 8:00, full from 12:00 to 18:00 and 55% at 21:00
Rain Density Scale Share of the crowd left in full rain, blending in as the rain grows. Default 0.35

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)

Loud Rpm Fraction / Loud Throttle An engine above 80% of its limiter at 70% throttle or more counts as revving hard
Rev Noise Radius / Rev Noise Cooldown Seconds A hard rev is heard within 25 m, at most once every 3 seconds per engine
Pop Noise Radius / Bang Noise Radius Backfire pops are heard within 15 m, bangs within 40 m
Engine Refresh Interval How often to look for engines as cars spawn and despawn. Default 2 s

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.