Jump to content

Home

Removing NPC Sound


AKPiggott

Recommended Posts

There's a cutscene in my level where there's a dead body. However, I use the "kill" command at the start of the cutscene and the character makes its death noise. I can't just have the character play a laying down animation, because when the cutscene ends, the player can then kill him again. I also can't remove the character's sound from NPCS.CFG because there are similar NPCs in the level that need those sounds. Is there an ICARUS command or something that will let me disable the use of sounds for this particular NPC?

Link to comment
Share on other sites

There are a couple of commands in BehavEd for sound methinks...set_nocombatsound and a few others, if you set these for the NPC then it should make no noise I think. You could set them back to using sound after the cutscene if you want the NPC to use sounds again afterwards. I gave it a go with some NPCs and they don't make a sound as I remember.

Link to comment
Share on other sites

I guess you could have a trigger that kills him, but is far enough away from him so you don't hear it. The problem could be how long the body stays there. I can't see any commands for making a dead NPC's body reamin any longer than the norm.

 

This is unrelated but I wondered if you could help me with something. For JK2 the sound files have to be Layer 3, 44,100Hz right? And using mono seems to make little difference from stereo except it cuts the file size a lot, so I used that. The part I'm not sure about is what I think is the sample rate. For my last map I used 128kbps, but I'm thinking that was maybe overkill...the sound files were pretty damn massive. What sample rate are you planning to use?

Link to comment
Share on other sites

I just thought up some more creative...less likely to work solutions.

 

You could have the kill script run when you are nearby, but have a lot of ambient noise in that particular area so you don't hear the death sound.

 

You could have the NPC in a sleeping/lying animation, and just make them invincible, and turn off combat sounds.

Link to comment
Share on other sites

1. Make a func_train which is linked to a path_corner where the guy is supposed to be. Make another path_corner on top of that and link them like a normal train.

 

2. Set the func_train to also draw the GLM of the enemy. Fool around with the spawnflags until you can get it to animate once, make sure to set the frames of the animation (use the whole scope, inside the 0-17K range). I know you can loop GLM anims like this, but I never tried just one animation.

 

3. Make a crude set of clip brushes where the dude will lie.

 

 

Other possible solution:

 

Import the GLM of the guy into Milkshape, manipulate it so he looks dead, and export to MD3, ASE, 3DS (probably best since MS3D doesn't work with ASE by default I think).

 

Other possible solution:

 

Make a new NPC and remove his sounds and use a kill command.

Link to comment
Share on other sites

I might just have the character die with the camera out of the sound radius. I'll try and think of a way to not make it seem tacky.

 

Ken: I also save mine at 128kbps, they're not that big. The hundred or so lines of recorded dialogue I have only add up to about 4 MB.

Link to comment
Share on other sites

Originally posted by AKPiggott

I also can't remove the character's sound from NPCS.CFG because there are similar NPCs in the level that need those sounds.

 

So do you mean you want (for example) a stormtrooper that dies with no sound, and so you can't remove the sound because other stormtroopers need it? Or do you mean you have a new NPC, say my_stormtrooper, and it uses the same sound directory as the normal stormtrooper?

 

Just thinking off the top of my head here, but what if you make a new sound directory for this particular NPC. In this directory you put all the sounds used by this new NPC, and then delete the dying sound. Then you could make a new entry in NPCs.cfg, and set that NPC's sound directory to your new directory that doesn't have the dying sound. Then use this NPC only in your cutscene.

 

Don't know if that would work or not :confused:

Link to comment
Share on other sites

Making new NPCs without replacing old ones is as easy as pie. I've done it for my own game. I've added Darth Maul and Jerec to SP so that I can spawn and fight them. Emon's tutorial is a good one, but here it is in a nutshell:

 

- decide what NPC you want to clone, and copy that entry in NPCs.cfg, and paste it.

 

- Next you need to change the name. The key here is that the new name contains the old name so the engine knows how to use the model. Going with our stormtrooper example, you might name it "stormtrooper3" or "stormtrooper_funnyface". So now you have a new kind of stormtrooper.

 

- now change the sound directory entries (I think there are three categories) to point to your directory that is missing the death sound.

 

That should pretty much do it I think. This option doesn't add much to filesize, since you would be using the default model. Just the increased size for the sounds.

 

This doesn't apply to your case, but if you wanted to change one of the variants of a model (like the stormtrooper or gran, or weequay), you can alter the model directory entry to use a different model. However, you need to have the directory name contain the type of the original model. For example, I have replaced the Granshooter with a battledroid, by changing the Granshooter entry in NPC.cfg so the the model diretory points to granshooter_battledroid. Then I changed the sound directory to point to the battledroid sounds, and altered the health points, and so on.

 

Anyway, I know this isn't what you were trying to do, but maybe someone else might find it useful :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...