![]() |
Play custom sound at area? - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Play custom sound at area? (/thread-11633.html) |
Play custom sound at area? - FreshKorruption - 12-03-2011 Hey guys. So I don't know what I am doing wrong. I have the custom sound (fmscream1.ogg) in the sounds folder, but when i hit the area, it wont play the sound. Here is the script i have. BTW it isn't scripted like this. It is scripted in the right positions and not just beside each other. AddEntityCollideCallback("Player", "scream_1", "Scream", true, 1); void Scream(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "fmscream1", "Player", 0, false); } RE: Play custom sound at area? - flamez3 - 12-03-2011 You need to go into the sounds folder and create a fmscream1.snt file. Than add this: <SOUNDENTITY> <SOUNDS> <Main> <Sound File="fmscream1.ogg" /> </Main> </SOUNDS> <PROPERTIES Volume="1" MinDistance="20" MaxDistance="100" Random="1" Interval="5" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.8" Priority="0" /> </SOUNDENTITY> Than instead of this: PlaySoundAtEntity("", "fmscream1", "Player", 0, false); Do this: PlaySoundAtEntity("", "fmscream1.snt", "Player", 0, false); RE: Play custom sound at area? - Unearthlybrutal - 12-03-2011 void OnStart() { PreloadSound("fmscream1.snt"); } Would be good ![]() RE: Play custom sound at area? - FreshKorruption - 12-03-2011 (12-03-2011, 07:53 AM)flamez3 Wrote: You need to go into the sounds folder and create a fmscream1.snt file. Than add this: Thanks it worked. Would i have to do the same thing with the music i am going to play during the credits? RE: Play custom sound at area? - flamez3 - 12-03-2011 (12-03-2011, 02:40 PM)FreshKorruption Wrote:(12-03-2011, 07:53 AM)flamez3 Wrote: You need to go into the sounds folder and create a fmscream1.snt file. Than add this: I would do that just to be sure. RE: Play custom sound at area? - Statyk - 12-03-2011 (12-03-2011, 02:40 PM)FreshKorruption Wrote: Thanks it worked. Would i have to do the same thing with the music i am going to play during the credits?As far as I know, the credits run ".ogg", so no .snt is necessary. but if not, just make the .snt. |