Frictional Games Forum (read-only)

Full Version: .SNT Files Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone, this is my first post and first custom story. Just thought I'd say that.[/code][/php]

So I've tried to add custom sounds to my Amnesia story and I'm having some problems. I've got the code as so:

void OnStart()
{
PreloadSound("voice.snt");
}

Then I've got some script collision into:

void CollideScriptArea_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "voice.snt", "servant_grunt_1", 0, false);
}

And all works good. I've saved the .snt and .ogg file of "voice" into my custom stories / sounds folder. However what I can't seem to get to work is the .snt file. I works fine enough as in it plays the sound, however the idea of it is to alter the sound properties of the .ogg file right? But whenever I change a property in the .snt file - like changing the volume or if it loops or not and then saving the file, in game it doesn't seem to change it. I could have the volume set to "1", then change it to "4" to no difference in game. Why is this? Am I not doing something correctly? Is my computer screwing up perhaps?

One other thing. When the sound plays, I want to play it at a specific entity. However it seems to be just as loud to me when I'm one meter away from the entity as it does when I'm twenty meters away. What properties can I change to make it more localised to the entity (the further away the softer it gets)? Naturally I must solve my first problem before working out this, but I thought I'd just ask both here.

Thanks in advance.
A majority of coding languages prefer 0-1 settings instead of 1-100. I'm pretty sure 1 is max, so anything above it defaults to that. By 0-1, I mean 0.1 0.2 0.3 0.4 etc. You could probably set more digits. As for sounds at entities, there might be a distance setting, but that I'm not as sure about.
You're lucky, i can't even make my sound play!

i also have the : PreloadSound("clock.snt");
and PlaySoundAtEntity("clock", "clock.snt", "clock_grandfather_1", 2, false);

But i can't make it work, im afraid perhaps something is wrong with my .ogg file...

How did you produce your .ogg file??

Edit: nvm made it work Wink
Well there is mindistance and maxdistance or something like that? perhaps those work? go check .snt files that you know fades.. Perhaps they use 3d as well i am not sure but according to my logic that should be the case. Try different things bools variables and check out stuff you know works the way you want yours' to work like. Hope you will get it to work eventually =)