npc paths

npc paths

Re: npc paths Posted by please help me on Tue Apr 18th 2006 at 5:04pm
please help me
7 posts
Posted 2006-04-18 5:04pm
7 posts 1 snarkmarks Registered: Dec 26th 2005
HOW DO I MAKE NPC PATHS?!?!??!?!?!

this is REALY driving me crazy and so is my other problem
Re: npc paths Posted by ReNo on Tue Apr 18th 2006 at 6:31pm
ReNo
5457 posts
Posted 2006-04-18 6:31pm
ReNo
member
5457 posts 1991 snarkmarks Registered: Aug 22nd 2001 Occupation: Level Designer Location: Scotland
No offence, but your method of asking questions could use some work. You aren't doing yourself any favours by typing in capital letters, using ridiculous numbers of question/exclamation marks, and being so blunt. Also, that isn't a name. We appreciate that you are here looking for help, but is that really what you want to be known as? What if, a few months down the line, you want to use this site for more than getting help? It isn't going to look very good if you put up a level for feedback or release under that name you know.

Right now for answering the question. The question could potentially have two answers so I need a bit of clarification I'm afraid. Do you just want to allow NPCs to navigate your level using their AI? Or do you want to create a specific path for an NPC to walk along?
[img]http://card.mygamercard.net/sig/Default/reno84.png[/img]
Designer @ Haiku Interactive | ReNo-vation.net
Re: npc paths Posted by please help me on Tue Apr 18th 2006 at 6:45pm
please help me
7 posts
Posted 2006-04-18 6:45pm
7 posts 1 snarkmarks Registered: Dec 26th 2005
i want to use ai. thank you for the comments i will work on my behaviors
Re: npc paths Posted by ReNo on Tue Apr 18th 2006 at 7:19pm
ReNo
5457 posts
Posted 2006-04-18 7:19pm
ReNo
member
5457 posts 1991 snarkmarks Registered: Aug 22nd 2001 Occupation: Level Designer Location: Scotland
Cool, thats what I like to hear :smile:

Ok, if you want to just enable the NPCs in your level to move around using their own AI, you need to setup a system of nodes. These act as waypoints of sorts for the AI, so it can build paths between them in order to plan a route to their destination. The general idea when laying out nodes is to keep them within line of sight of one another, and to place them at points where the NPC may want to change direction. If, for example, you had an L-shaped corridor, then you would probably want to place 3 nodes - one at each end of the corridor, and one at the corner in order to allow the NPC to always see the next waypoint on their route. NPCs will use their AI to dodge small or dynamic objects that block the paths between nodes, so you don't need to worry too much about other NPCs or physics objects blocking line of sight between nodes. Oh, the entity to use for your nodes is the "info_node" entity by the way - just plonk them on the floor and move them around the world on the top view :smile:
[img]http://card.mygamercard.net/sig/Default/reno84.png[/img]
Designer @ Haiku Interactive | ReNo-vation.net