Jump to content

Home

dealing with scripting


000nate

Recommended Posts

My npc_kyle in my map, that I spawned (I wanted it to be seperate from my info_player_start Kyle) and I gave him a targetname of cinematic5_kyle or something just never spawned. My script looked something like this: (I just want to see if this will work)

 

//(BHVD)

camera ( /*@CAMERA_COMMANDS*/ ENABLE );

camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam1", ORIGIN)$, 0 );

camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cam1", ANGLES)$, < 0.000 0.000 0.000 >, 0 );

wait ( 8000.000 );

camera ( /*@CAMERA_COMMANDS*/ DISABLE );

 

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

{

set ( /*@SET_TYPES*/ "SET_ADDLHANDBOLT_MODEL", "models/map_objects/cinematics/comlink.glm" );

set ( /*@SET_TYPES*/ "SET_LOOK_TARGET", "kyle5_lookright" );

}

 

 

The text in bold is what I'm concentrating on right now. I was wondering that in behaved do you have to specify spawn npc_kyle or can I just have my map spawn him.

Link to comment
Share on other sites

hmmm. Let me put it another way. All I want to do (for now) is get kyle to raise his hand to hi face with a omm device and make a few motions with his face and facial expressions. I believe that I found out how to put a comm in his hand. But I still need to move his mouth and stuff. However I can't even get anywhere because kyle doesn't spawn. I think this is because I didn't say spawn the kyle model in the script. But I can't be certain. I also tried spawning a stormtrooper to do Kyles movements and to see if it had to do with the kyle model but still he did not spawn. By now I'm almost certain that you have to speify spawn in the script some where but I don't know where.

Link to comment
Share on other sites

The easiest way to get the NPC_Kyle is have him spawn from the same trigger you are using to start the script. So connect from the trigget to the NPC_Kyle and he will be spawned. I've never tried the handbolt methos, it may work I don't know. I went through the animation_both list and found a use comlink animation. Then after that had a hold_animation_both for say 50 seconds. I didn't bother with mouth animations as the comm link nicely covers Kyle's mouth....

 

Don't forget to give the NPC_Kyle the following:

 

Key: NPC_targetname

Value: cinematic5_kyle

Link to comment
Share on other sites

hmm

 

Try adding this to your affect command:

 

set ( /*@SET_TYPES*/ "SET_INVISIBLE", /*@BOOL_TYPES*/ "false" );

 

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

 

Also, did you name your npc with "npc_targetname" and not "targetname"?

 

Edit: Kengo beat me to it:D

Link to comment
Share on other sites

You bring up a set_command. Double click it, in the box on the left, scroll down the options until you find set_animation_both (or similar). Then go to re-evaluate, and on the right a list of animations comes up. Scroll through these and look for one with a comm device.

Link to comment
Share on other sites

  • 2 weeks later...

ok well so far so good. It worked all fine, as far as him actully being there and talking on the comm pad. But one problem. I spawned the npc_kyle in a totally different room he was supposed to be spawned in. So the given affect was he wasn't in my cutscene (because he didn't spawn there) But after the cut scene I went through some of the level and saw him sticking out of the floor. How can I get him to spawn where I want him to. I've also noticed that he wants to spawn where another of my targetscriptrunners were. It shouldn't have caused the error but I'm going to check in case.

Link to comment
Share on other sites

An NPC should spawn right were you place him in Radiant. How else can it be? Later on you can adjust his position by moving him around with navgoals or placing a ref_taq and setting his origin to it, thus effectively "teleporting" him anywhere you want in your map. If he is in <0,0,0> maybe you should check in Radiant his origin values. Of course, check also your script. Maybe you are, by accident, setting his origins to <0,0,0>.

Link to comment
Share on other sites

I was able to get it to work....thanks guys. However another problem has a risen. Probably much simpiler to answer. In scripting wht command should I use, and how do I use it to stop a sound (a song anyway) which is going on?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...