Jump to content

Home

NPC_kyle won't walk


master_thomas

Recommended Posts

Posted

I made an NPC_kyle for a cutscene and put the following in my script:

 

affect ( "kyle_cutscene1", /*@AFFECT_TYPE*/ FLUSH )

{

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_NONE" );

//$"walkOnly"@5

set ( /*!*/ "SET_BEHAVIOR_STATE", /*!*/ "BS_DEFAULT" );

set ( /*!*/ "SET_WALKING", /*!*/ "true" );

set ( /*!*/ "SET_RUNNING", /*!*/ "false" );

set ( /*!*/ "SET_IGNOREALERTS", /*!*/ "true" );

set ( /*!*/ "SET_LOOK_FOR_ENEMIES", /*!*/ "false" );

 

task ( "walktojan" )

{

set ( /*@SET_TYPES*/ "SET_NAVGOAL", "kyle_walk1" );

}

 

dowait ( "walktojan" );

}

 

 

To the NPC_kyle, I've this with the cutscene flag checked and unchecked and he just stands there with a rifle.

 

What did I do wrong?

Posted

Well, you script sets him to be in bs_default, no matter if you check the cinematic flag in Radiant or not. Normally you might want to have him to be in a cinematic bs_state, because that would eliminate any possibilities of bizarre behavior in odd circumstances, let's say if some enemy was still lurking in some dark corner.

 

Also check your NPC_targetname. And check that the script is actually launched ever (with a correct path). And remember if you use the cinematic behavior state, you must apply the walking / running animation manually: set_walking(true) has no effect what-so-ever.

Posted

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_NONE" );

 

affect ( "kyle_cutscene1", /*@AFFECT_TYPE*/ FLUSH )

{

 

task ( "walktojan" )

{

set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_CINEMATIC" );

set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "true" );

set ( /*@SET_TYPES*/ "SET_NAVGOAL", "kyle_walk1" );

}

 

dowait ( "walktojan" );

}

 

Hmmm, you might want to put that wp_none command inside the affect, but possibly it will work better if tried outside the affect, not sure....

 

Make sure as Lassev says that the NPC_Targetname in Radiant is right: kyle_cutscene1

Also the navgoal itself needs a targetname: walktojan

 

I think those commands will do what you want...an npc in bs_cinematic automatically ignores enemies, doesn't look for them.

Posted

Oh man, thanks for picking that one up Leslie...I seem to be making errors a plenty of late. Well, I'm just gonna sleep a lot for a while. Wake me in the summer.

Posted

The NPC_kyle changes his weapon to match the player's. I know this because I have used npc spawn kyle and he stands there doing nothing until you change your weapon or use a script. (he does block). Does the NPC_kyle have any default AI that will bring him out of cinematic mode? A battle seen with kyle could be interesting or do I have to make a new NPC?

 

Anyway, the reason I was confused is that I had both kyle and jan doing similar things(walking and performing animations), but Jan almost did it perfectly, but started to move around part of the way through the anim.

 

Kengo. I feel like sleeping for a while too. Read my post in my showcase thread. Luckily, it is 10:30 and I'm going to bed after I view the forums.

Posted
Does the NPC_kyle have any default AI that will bring him out of cinematic mode

Well, to be exact, no AI will bring NPCs out of a cinematic mode. Cinematic mode is defined as being a mode without any AI. If you set NPC_kyle to bs_default you should indeed see some action, at least if there's an enemy present. However, as you stated yourself, NPC_kyle has always the same weapon in use as does the player. Maybe the AI requires the light saber to work efficiently.

 

A battle between a reborn and NPC_kyle is easy, however a battle between a jedi and NPC_kyle is a bit more tricky. Bell mastered also that; I've only tried it unsuccesfully, but then, it wasn't for my own purposes. For me, it was enough to get two grans fight each other. And fight they will.

Archived

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

×
×
  • Create New...