Post by thatdarnowl on Dec 24, 2023 11:39:55 GMT
Moving NPCs
Question Submitted By: Seregil
How do you make the NPC's to walk around, as they do when you put them out in any of the original maps.
I've made my own map but when I create a NPC, let's say a monk, he just stands there doing nothing...
How do I make him go around by his own??
do you have to create navigation points or something when you create the level?
Answer Category: Mapping / Embrace
You have two options here. You can create interest spots in your map and all generic pedestrian-type NPCs will wander randomly between them. Place an interest spot by right-clicking in the 2D grid and selecting "interest spots" from the context menu.
The second option, if you want to have more control over where each NPC goes, is to apply the WalkCycle script to them in the Things & Templates Editor, and then create a path for them to walk along. To create a path corner, select your NPC, hit Shift+K, then drag the new path corner to the first place you want them to move. Make sure that your path corner is not embedded in the floor and is on a walkable surface. Then, with the path corner selected, use Shift+K again to create a new point in the path, drag that and so on until you have created the path you want your NPC to walk. Lather, rinse, repeat, etc. for each NPC.
You can see how this was implemented in game by looking at the Club Tenebrae map.
-- Bug2U
magicman just pointed out one very important piece of info here that I was not aware of - if you are using interest spots, make sure that you use interest spot 0 for pedestrians... the different number interest spots relate to different types of models
-- Bug2U
Question Submitted By: Seregil
How do you make the NPC's to walk around, as they do when you put them out in any of the original maps.
I've made my own map but when I create a NPC, let's say a monk, he just stands there doing nothing...
How do I make him go around by his own??
do you have to create navigation points or something when you create the level?
Answer Category: Mapping / Embrace
You have two options here. You can create interest spots in your map and all generic pedestrian-type NPCs will wander randomly between them. Place an interest spot by right-clicking in the 2D grid and selecting "interest spots" from the context menu.
The second option, if you want to have more control over where each NPC goes, is to apply the WalkCycle script to them in the Things & Templates Editor, and then create a path for them to walk along. To create a path corner, select your NPC, hit Shift+K, then drag the new path corner to the first place you want them to move. Make sure that your path corner is not embedded in the floor and is on a walkable surface. Then, with the path corner selected, use Shift+K again to create a new point in the path, drag that and so on until you have created the path you want your NPC to walk. Lather, rinse, repeat, etc. for each NPC.
You can see how this was implemented in game by looking at the Club Tenebrae map.
-- Bug2U
magicman just pointed out one very important piece of info here that I was not aware of - if you are using interest spots, make sure that you use interest spot 0 for pedestrians... the different number interest spots relate to different types of models
-- Bug2U
Social Media