e-mods.net

Nod Engine SDK => Mapping in Embrace => Topic started by: Nagaraja on 2007-07-24, 08:03:42

Title: Moving NPC's
Post by: Nagaraja on 2007-07-24, 08:03:42
Question

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

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

 
Title: Re: Moving NPC's
Post by: Javokis on 2010-02-21, 15:49:07
-- 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 AI's. :)

-- Bug2U

The definition for interest point is located in the npc's .nai file. This is not really based on model, it's based on AI file assignment. I know this has been here awhile, but I figure I would clarify.
Title: Re: Moving NPC's
Post by: Barnabas on 2010-03-24, 02:18:56
Am I able to make a civilian NPC dancing? Without playing with NODeditor?
Title: Re: Moving NPC's
Post by: Kaelidian on 2010-03-24, 02:39:26
If you can dream it, it can be done. I know there are strippers that are set up to dance in certain mods, so if you didnt want to do the work of making the animation you could make civilians stripping lol.
Title: Re: Moving NPC's
Post by: Javokis on 2010-03-24, 11:54:43
Am I able to make a civilian NPC dancing? Without playing with NODeditor?

Resources.nob > 3d > Motions

Check out the nms files. ;)
Title: Re: Moving NPC's
Post by: Barnabas on 2010-03-24, 13:33:33
But how can I add a .nms file to a NPC in Embrace? I´d like to add some NPC to one of my maps - some who´ll dance, and some who don´t. But I want to use same skins. So I don´t want to have a copy of every civilian in the .not with one dancing and one standing.
Title: Re: Moving NPC's
Post by: Javokis on 2010-03-24, 14:41:09
There's no override for that last I checked. You'll need to use NOT Editor. There's plenty of tutorials on NOT Editor. I think I covered nms file assigning in the Making an NPC tutorial.

Look around.
Title: Re: Moving NPC's
Post by: Barnabas on 2010-03-24, 17:20:38
Ok, thank you.