Author Topic: How to package Sound Effects correctly?  (Read 3237 times)

I was trying to make a fire alarm sound effect, and this is my first time making these. I have the sound in a .wav file.

Contents:


description.txt

Title: Fire Alarm
Author: Nidos
Fire alarm sound effect

namecheck.txt

Sound_FireAlarm

server.cs

datablock AudioProfile(Alarm_Fire)
{
   filename = "./Alarm_Fire.wav";
};

I think I messed up on the server.cs part. I learned how to do it a while ago but forgot. I based these on default sounds by Badspot. If anybody can help me, please do so.

Download link to add on if necessary here

Code: [Select]
datablock AudioProfile(Elevators_GoingToGroundFloor)
{
filename = "./elevator_floorground.wav";
description = AudioClosest3d;
preload = true;
};
Add a description and idk if the preload is needed, but why not? Also you don't need a namecheck.txt, those are pretty much useless.

If those don't work then make your sound file smaller, and be sure that it should be mono, not stereo.

Code: [Select]
datablock AudioProfile(Elevators_GoingToGroundFloor)
{
filename = "./elevator_floorground.wav";
description = AudioClosest3d;
preload = true;
};
Add a description and idk if the preload is needed, but why not? Also you don't need a namecheck.txt, those are pretty much useless.

If those don't work then make your sound file smaller, and be sure that it should be mono, not stereo.
I made it mono and it didn't work. I'll try this, thanks

Doesn't it need a UI name to show up in the in game list, or is that just items and emitters

That should show up in the sounds list just fine, as I took that bit of code from elevator sounds real quick, and as you can see it's not parented to another datablock.

If you added .cs, .wav, and .txt to the end of the files, they aren't needed.
If thats just default and automatically did that, its fine and I don't know.

The code in the server.cs is looking for a file named Alarm_Fire.wav, but the sound file's name is FireAlarm.wav.