Jump to content

Home

trouble finding scripting tuts about making NPC walk and stuff


d_eisenga

Recommended Posts

okay, i am able to make a cutscene with a camera moving but without NPCs doing stuff its kinda boring huh.

 

i couldnt find any tuts on making them walk to a certain point or along a path and checking the example scripts didnt help me much as they were mostly uncommented.

 

i found something about a 'SET_NAVGOAL' but when i use this the NPC force jumps there... i tried adding 'SET_RUNNING, true' but no good.

 

i was able to figure out how to make them do animations so now its basically the walking that is a problem... could anyone direct me to tutorials covering this(not neccesarily for cutscenes obviously) or tell me what i'm doing wrong?

 

thanks a heap.

Link to comment
Share on other sites

Ah, damn, there was one excellent tutorial that would have suited you perfectly, but it seems to be offline. And now that I think more carefully, I guess it has been offline for a while already, so it's not coming back... I still have it all on my HD, but over there, it's not going to help you were much... :(

Link to comment
Share on other sites

Originally posted by GothiX

this?

 

I didn't remember 007 had such a tutorial, but it indeed seems he did (and so it happens that I have also that on my HD, btw). This was not, however, what I meant. The one I meant is several pages long, far more detailed and meant for Elite Force. But who cares, it was also perfect for JO/JA. It was actually there already such a long time ago, that even I was able to check a couple of things, before I became such a scripting wizard as I am.

 

Yeah, the EF tutorial described the fine art of using waypoints to allow smoother and easier nav_goal use. That was the very thing I learnt from that tutorial... Those were the good old times, when SP mapping wasn't yet dead and buried. I seem to have saved it on my HD 13th of September 2002...

Link to comment
Share on other sites

okay, they can walk now, but a new problem has arisen(dont they always). the tutorial says the navgoal has to be in the range of vision of the NPC, but when i want them to move in a long straight line and have to put several points in there, they pause on each goal.

 

i tried increasing their visrange and removing te inbetween navgoals but they wouldnt move at all.

Link to comment
Share on other sites

Do this: Build a chain of ordinary waypoints right from where the NPC spawns all the way to the nav_goal. It doesn't matter if the nav_goal is behind corners, just make it so that the waypoint chain is dense enough: the next waypoints is inside the line of sight of the previous one. Build the chain by just targeting the first waypoint to the second, the second to the third, the third to the fourth etc...

 

If you have doors along the way, you may have to place a nav_goal in front of the door. The problem is that if the NPC doesn't see the next waypoint behind the door the very moment he reaches the one before it (when the door is not yet open), he might not continue even after the door opens. However, I am not sure about this, so try it out.

 

If you have stairs (clip them of course) don't spare the waypoints. Stairs are one of the most difficult places for the NPCs, but they can be handled.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...