Jump to content

NPC issue, refuse to walk to nav_goal


Recommended Posts

Posted

Okay let me quickly spill it out.

 

I have a pain_script on my dock workers, once I hit them, they run to a console, press the button, which will trigger an effect (so far, no problem) 

The trigger_once is linked to a a target_relay, which is linked to 4 npc's which spawn (group of stormies) (so far this works)

 

They spawn each with a spawnscript.(it's tested with a print on the screen, which appears) they each have in their entities the following

 

 

key: spawnscript
value: infiltrate_sp/alarm_stormtrooper_outside
 

which ends up in behaved as this

 

 

//Generated by BehavEd
 
rem ( "Stormies that come from inside after alarm" );
set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_DEFAULT" );
print ( "!This is a message!" );
set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "false" );
set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "true" );
 
task ( "alarm" )
{
set ( /*@SET_TYPES*/ "SET_NAVGOAL", "spawn_alarm" );
}
 
do ( "alarm" );

The layout is as following

 

 

 

layout.jpg

 

 

 

So I guess I made an error somewhere along the road but cant seem to find it. They just refuse to walk to my navigation point where I tossed in the targetname spawn_alarm? Anybody see an issue I missed?

therfiles likes this
Posted

I've had this problem a ton! I'll set everything correctly but the NPC just won't move. I've tried moving the nav_goal closer (but that shouldn't make a difference, really) and adding chains of nav_goals, and that sometimes fixes the problem. Really eager to hear anyone else's advice! :D

Posted

Shouldn't your Behavior State be set to BS Cinematic?

 

I ll try this and will change behavior then when they reavh spawn, but preferly i like them to spot me when they come out the facility.

 

I've had this problem a ton! I'll set everything correctly but the NPC just won't move. I've tried moving the nav_goal closer (but that shouldn't make a difference, really) and adding chains of nav_goals, and that sometimes fixes the problem. Really eager to hear anyone else's advice! :D

Glad i am not the only one at least, ill put some extra navgoals in it, and see if this works, but wondering if this isnt an entity killer, you add bassically extra entities to the map :( which maybe are needed later

Posted

I solved it, but it costed me a few more waypoints and I think I know why:

 

I have an area portal placed there, which will later be the door. (dont wanna bring my vis into the facility of the huge outdoor in brushes) I think they cannot see beyond the areaportal or the skip shader. I read somewhere in Lassev tutorial NPC's seem to have problems with looking beyond doors, even if they are open. So i did place a few nav points, added waypoints in the func_useble and changed the stormies behavior state (not to a point it would interfear) and it seems to work now. I think it has all to do with the areaportal or the func_usabile (and later func_static, which my door will be.

 

edit

 

I removed the extra navpoints again, and moved the waypoints in the func_usable / areaportal, and ran the script without the extra tasks. It works fine now, so I am gonna asume its either the areaportal or the func_usable that was being the problem. Thanks for the suggestions all

Posted

adding chains of nav_goals

If that helps, it means you don't have a proper waypoint network. A single navgoal can send an NPC across the whole map if it's set up properly.

 

In the case of doors, you want one waypoint close to it on each side. As I said, try "nav show all" to see the network, it will also highlight temporarily blocked paths (such as those caused by doors), NPCs will be able to pass through there if the next waypoint is close enough for the door to open when the NPC is there.

Lazarus likes this
Posted

I didnt knew about that command in game (the nav show all) it shows indeed points where you put the markers and if its broken up somewhere.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...