Make a crowd turn towards a shout or an explosion in a wave, near ones first
When something happens in a town square and every villager turns in the same frame, it looks like a switch was flipped. Real people react at different moments depending on how far away they are, how busy they are and how alert. This entry gives each person a reaction time that makes a visible wave, and leaves out those too far to notice.
Why this works
People do not all notice a shout at the same instant: those nearby hear first, and each has a personal reaction time. A visible wave of heads turning tells the player where the event happened and makes the crowd feel like individuals, not one block.
When not to use it
Wrong when everyone must react together, like soldiers obeying a drill, a trained squad or robots on one command. It is also too costly for huge crowds that are far from the camera. There, switch them all at once.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 29 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Make a crowd turn towards a shout or an explosion in a wave, near ones first" (read_entry crowd-turns-to-an-alarm-in-a-wave-from-near-to-far) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP