GMod Peds

Yesterday I got a great idea! What if you could add pedestrians to your city? But simple NPCs that only walk around are quite uninteresting. As games like GTA4 or Fable have shown, if they do something more than walking around, they’ll create a great atmosphere.

So we need Peds that walk around and do stuff randomly. This can be done by placing and using scripted sequences in Hammer.

Here’s a little graphic to show what I thought of:

The dots are scripted sequences. NPCs will be placed as usual and get a name that starts with “gmodped_”. They spawn at the beginning of their start sequence (i.e. opening the door of a house, walking out, closing the door). If there’s no “next script” set up, the NPC will randomly pick a sequence which’s actor is “gmodped_”. Those can be single sequences like buying a soda from a soda machine as well as complex sequences like buying something in a restaurant and sitting at the next free table. If a sequence has a specific ped as an actor, only this one can use that sequence.

The peds don’t react to you until you behave very violent. Then they will flee. If there’s a scripted sequence with the actor name gmodpedact_ then they will target that one to hide there until the violence is over for quite some time. This could be hiding in a little shed or behind objects in a dark backyard or something. If there’s no free spot to hide or it’s too far away, they will flee out of a certain radius from the player. And if a sequence has the no interuptions flag set, they will continue that sequence until it’s done (i.e. sitting in a train that drives along the violence scene). If they’re too far away from the violence they simply won’t notice.

What do you think?

PS: Sorry for my bad english! It’s not what it used to be anymore.