Jump to content

Sound and animation sequence in nif


Recommended Posts

pixelhate - Hello!

 

"To trigger a sound in an animation sequence, I place the value "Sound: WhatEverSoundName" in the NiTextKeyExtraData of the sequence, at a certain time."

 

That's correct, I've used this for fixing the Point Lookout Doors & also for new items.

 

"Is there a known value to stop/interrupt the sound ?"

 

The sound plays for it's length & stops on it's own.

 

For instance a door opening plays it's creak sound & the creak stops when it comes to an end.

 

You can do more things with sound by having a script attached to your object & using the "PlaySound" command to play the sound you want instead of building it into your mesh.

 

http://geck.bethsoft.com/index.php?title=PlaySound

 

Oddly I don't think there's a way to stop a sound playing directly even in scripts, they play out & that's it.

 

The sneaky method is to enable & disable a sound object that's linked to your object.

 

I used that method on some showers I made, you turn them on & the spray & sound of running water are enabled. Turning it off disables the water & sound object.

 

Hope this helps!

 

Prensa

Link to comment
Share on other sites

Hello prensa :)

"The sound plays for it's length & stops on it's own."
So there's no known way to interrupt a looping sound with a value (like StopSound: SoundName)
I have an object with two sequences that simulate On & Off stages. Stages are switched via activation.
The On stage should have a looping sound, in line with looping sequence, while the Off stage should have no sound.
The looping sound is triggered each time the sequence loops and sounds are stacking and playing continuously.
So, either I make the sound the exact length of the sequence and play it non looped. (I like when everything is in the nif, I find it more elegant.)
Or I use the sneaky method you described (which was my actual workaround).

"I used that method on some showers I made, you turn them on & the spray & sound of running water are enabled. Turning it off disables the water & sound object."
I have the same in my work :)

Another related question, if you don't mind :
If have a custom sound, named PixSound01, placed in Sound\fx\Pix, how do I type the value in NiTextKeyExtraData ? Sound: PixSound01 doesn't seems to work.
Is there a prefix that indicate to look in the custom folder ?


Thanks for help ! :)

Pix

Link to comment
Share on other sites

pixelhate - Hello!

"So there's no known way to interrupt a looping sound with a value (like StopSound: SoundName)"

Not that I've seen, there could be of course.

I know there's not a stop sound for scripting, many have asked in the past. :)

Quite odd since it seems such an obvious command.

Activators can have a Looping Sound set, not sure if that comes on when they are activated or not. I'm not sure, not used it myself.

"So, either I make the sound the exact length of the sequence and play it non looped. (I like when everything is in the nif, I find it more elegant.)
Or I use the sneaky method you described (which was my actual workaround)."

I think those are your only options.

The enable/disable of a sound object works great, as I mentioned I used that method on a shower.

That's pretty much the only looping sound I've used.

As long as the object that needs the loop is static in one location is the only real limitation as it needs to be near the static sound object.

 

"I have the same in my work"

 

Shower was fun to make, I recently made an animated turning knob to switch it on & off. :)

"If have a custom sound, named PixSound01, placed in Sound\fx\Pix, how do I type the value in NiTextKeyExtraData ? Sound: PixSound01 doesn't seems to work.
Is there a prefix that indicate to look in the custom folder ?"

You must set the sound up in GECK first for it to be a viable sound for the mesh to use.

Sound: PixSound01 is correct, provided "PixSound01" is what you called it in GECK.

Important to note it's not named after what the file in the Sound folder is called, it's the name given to the sound in GECK that you use (obviously if the two are named the same then is that name :) ).

So if you set up the sound in GECK to be OBJPixSound01 that points to PixSound01.wav then your mesh would use:

Sound: OBJPixSound01

Prensa

Link to comment
Share on other sites

"Activators can have a Looping Sound set, not sure if that comes on when they are activated or not. I'm not sure, not used it myself."

Looping sounds set in activators will play continuously regardless if they are activated or not. They're often used with idle sequence.

 

"You must set the sound up in GECK first for it to be a viable sound for the mesh to use."

Oh great ! It makes all clear now. I thought it was more a path file thing.

Works as expected now.

 

Thank you, prensa :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...