Frictional Games Forum (read-only)

Full Version: Sounds at entity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello. It has been a while since I had used Suite, but with so much free time on my hands again, I thought I'd boot it back up - im enjoying it, but whats put me off from continuing is the zero scripts, so I thought I would try some simplistic things.

what im trying to achieve is a sound to play from an entity (namely a clock) - when the player walks up to it, it goes off - and it does, but its through the player, so even if I leave the proximity of the clock, the sound continues until it naturally stops. I have tried adding it to a couple objects - last one was a brick (which I hid behind the clock), which is down below, but no changes. either the sound plays via player, or it doesnt play at all.

surely I've made a dumb mistake somewhere, because I believe theres already a command to play sounds via player, and that is "PlayGuiSound".

void OnStart()

PlayMusic("mansion.ogg", true, 0.8, 0, 10, true);
AddEntityCollideCallback("Player", "clockscarescript", "Sound", true, 1);

void Sound(string &in asParent, string &in asChild, int alState)
PlaySoundAtEntity("sound", "clockscare.snt", "brick_1", 0.1, false);


I've barely got anything in there right now, but I'd like to sort out my problems before moving on, instead of putting it off and returning later.
It is possible that the clockscare.snt file does not use 3D sound, and thus just plays everywhere as long as you're in range.

I'm not sure what .snt you used to create clockscare.snt, but it is possible that you used a .snt file that does not use 3D sound.
If you want 3D sound, your audio file must be using a mono channel, not stereo.
thank you guys so much for the help - it was the file not being specified as 3D. it was a custom sound I had edited via audacity, but I overlooked the extra options when creating the SNT file for it.