Jump to content

Waypoint/Navgoal Issue?


MagSul

Recommended Posts

I did a quick mock-up of what I'm after, pay close attention to Kyle's movement when he approaches the player.

 

 

The waypoints in the map are strung together in a perfectly straight line and the navgoal which Kyle is running to from his starting position further down the corridor (there is only 1 navgoal, the one he's running to) is also sat along this straight line.

 

If the player hits the trigger close to the edge of the corridor, Kyle just runs straight up and stands normally. If the player approaches the trigger via the center of the corridor, he does that weird turn upon approaching the player. Does anyone know if this is purely a distance thing, or am I not doing something right?

 

Thank you!  ^_^

ooeJack likes this
Link to comment

That is odd. I have NPC's running to navgoals at the player and don't remember seeing this happen. Is your Kyle NPC set to BS_Cinematic?  What does your script look like?It seems to me that NPC Kyle is reacting to something which he shouldn't.

 

 

 

In my test chamber where the Stormtroopers gun down the prisoners I started them off like this. 

Trooper 1 Example

affect ( "trooper1", /*@AFFECT_TYPE*/ FLUSH )
{
	set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_WALK1" );
	set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "true" );
	set ( /*@SET_TYPES*/ "SET_WALKSPEED", 50 );
	set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 10 );

	task ( "go1" )
	{
		set ( /*@SET_TYPES*/ "SET_NAVGOAL", "t1nav1" );
	}


	task ( "go2" )
	{
		set ( /*@SET_TYPES*/ "SET_NAVGOAL", "t1nav2" );
	}

	dowait ( "go1" );
	dowait ( "go2" );
}

If your script doesn't look like this just modify it to your needs. My apologies if it does but you didn't post the script so I'm just covering all the bases.

Link to comment

Is there an (area)portal in that corridor? I had that problem earlier with an old project as well, i had to lay out an extra waypoint in the end, because it couldnt navigate through the portal / hintbrush. Try adding one for good meassure ... and .. make kyle look at you by adding the SET WATCH_TARGET in Behaved to the player, cause he is now ackwardly turned... lol.

 

After Stop ... why was I hoping for a hammertime .......?????????????

Link to comment

H'okay, so the good news it that Kyle's fixed! I just had him change to a walk when he got close. I also tidied my waypoints. There were multiple targets from one in particular.

 

Question though, 

//(BHVD)
 
task ( "animation" )
{
set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_STAND1" );
set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 25 );
}
 
My hope was that the above would prevent the player from performing the idle animation during the interaction. This doesn't seem to be having any effect. I was hoping someone might be able to steer me in the right direction.
Link to comment
 
My hope was that the above would prevent the player from performing the idle animation during the interaction. This doesn't seem to be having any effect. I was hoping someone might be able to steer me in the right direction.

 

 

I think you might need to add another affect "Whatever your NPC targetname is" with flush after it before the next task. Here is an example:

 

affect ( "trooper2", /*@AFFECT_TYPE*/ FLUSH )
{
set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_WALK1" );
set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "true" );
set ( /*@SET_TYPES*/ "SET_WALKSPEED", 58 );
set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 10 );
 
task ( "go1" )
{
set ( /*@SET_TYPES*/ "SET_NAVGOAL", "t2nav1" );
}
 
 
task ( "go2" )
{
set ( /*@SET_TYPES*/ "SET_NAVGOAL", "t2nav2" );
}
 
dowait ( "go1" );
dowait ( "go2" );
}
 
wait ( 8500.000 );
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam4", ORIGIN)$, 0 );
camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cam4", ANGLES)$, < 0.000 0.000 0.000 >, 0 );
 
affect ( "trooper2", $FLUSH$ )
{
set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_STAND5SHIFTWEIGHT" );
set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", -1 );
}
 
This gets trooper 2 walking through his waypoints then that is flushed out and then the new stand animation is played indefinitely (-1)  until something the NPC is told to do something else. Its how Raven did stuff in Kejim which is what i used as a basis for my script.
Link to comment

Good morning! I'd placed an affect on the player already and that wasn't working. I've done a bit of a cheaty way which is to just have the animation line re-appear a few times in the script. It's not the most efficient way, but it works without hindering anything so it'll do for now.  ^_^

Link to comment

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...