How to make NPC's behave like this?

Just found it’s possible to play RTCW in browser the demo, so I wanted to refresh what’s that game is doing with NPC’s.

Few thing’s I noticed is:

  • they notice you in distance and have dialogue, some of them go research some continue they routine
  • npc have few routes, and positions which make sense in game ( like doctor washing hands, in barracks guys are around fire, fixing radio, …
  • if alarm went off it can be also stopped and destroyed
  • they also react to alarm, and also finding player in various location in level

The another thing in noticed and it’s quite fun is this walking on stairs, if you going down it’s similar to slide.