Jump to content

Adding sound loops to NPCs


Lfan
Go to solution Solved by Circa,

Recommended Posts

Hi everyone!

I'm looking for a way to add loop sounds to NPCs (like the rancor sound which is looping all the time when you spawn the creature).

I want to use it for a Darth Vader NPC and for Xenomorphs.

The rancor idle loop sound is handled by a file called "loudbreath.wav".
I tried to copy that file to my custom characters to see if the game automatically plays the sound if it's there, but it doesn't.
Hopefully it's not hard coded!

So how do I apply sound loops to custom NPCs?

Link to comment

You have some options with this, the most basic solution is create a script in BehavED to call the NPC, have them play a sound, and loop it. 

Sadly as you said earlier, the rancor and sand creature breathing is hard-coded. I don't have the code in front of me right now to say where, but I do remember when implementing breathing sounds for Darth Vader and Lord Starkiller in Galactic Legacy it was only a couple of lines of code.

But if neither option is available for you, then the lightsaber sound would probably work best for you. 

Link to comment
  • 4 months later...

I came across this and was wondering if someone could specify the location of the hard-code for this. I have a background in coding so no tutorial necessary, I just cannot for the life of me find the file that specifies this behavior! I have an NPC that has idle sounds as well as walking sounds, obviously I cannot do that with .pk3 alone. If anyone could help me find the file, much appreciated!

Link to comment
On 3/21/2024 at 1:32 PM, RebornKyle said:

I came across this and was wondering if someone could specify the location of the hard-code for this. I have a background in coding so no tutorial necessary, I just cannot for the life of me find the file that specifies this behavior! I have an NPC that has idle sounds as well as walking sounds, obviously I cannot do that with .pk3 alone. If anyone could help me find the file, much appreciated!

I believe the breathing sounds are called in the AI files for the rancor and sand creature. 

RebornKyle likes this
Link to comment
  • 2 weeks later...
On 3/24/2024 at 9:53 PM, Linken said:

I believe the breathing sounds are called in the AI files for the rancor and sand creature. 

Thank you that is indeed where it was. Also, the walking sounds I found are specified via animation in a animevents.cfg that you have to include for walk sounds to work. In case anyone else has the same issues

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