Frictional Games Forum (read-only)
PlaySoundAtEntity not working :( (Help Needed!) - 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: PlaySoundAtEntity not working :( (Help Needed!) (/thread-18825.html)

Pages: 1 2


PlaySoundAtEntity not working :( (Help Needed!) - 4WalledKid - 10-17-2012

Ok so I want a scream sound to activate when the Player collides with an area. I already created the script for the collision. I used
PHP Code:
PlaySoundAtEntity("""21_scream10""Player"0.0ffalse); 
but it wont work! I don't know why? Thanks!


RE: PlaySoundAtEntity not working :( I need HELP! - brute360 - 10-17-2012

I think you need to put something between the first quotation marks.


RE: PlaySoundAtEntity not working :( I need HELP! - 4WalledKid - 10-17-2012

(10-17-2012, 05:19 PM)brute360 Wrote: I think you need to put something between the first quotation marks.
What do I have to put in there??


RE: PlaySoundAtEntity not working :( I need HELP! - brute360 - 10-17-2012

Try typing "Test" and see if that works.


RE: PlaySoundAtEntity not working :( I need HELP! - 4WalledKid - 10-17-2012

(10-17-2012, 05:32 PM)brute360 Wrote: Try typing "Test" and see if that works.
I got it! Is this


PHP Code:
    PreloadSound("L01_screams.snt");    PlaySoundAtEntity("""L01_screams""Player"0.0ffalse); 

Thanks for the reply anyway!


RE: PlaySoundAtEntity not working :( I need HELP! - Statyk - 10-17-2012

You are trying to call a specific .ogg, while PlaySoundAtEntity searches for .snt. You can either make your own .snt using Notepad/Notepad++ and have the game read that, or you can have it read:

PlaySoundAtEntity("", "21_screams", "Player", 0.0f, false);


RE: PlaySoundAtEntity not working :( I need HELP! - 4WalledKid - 10-17-2012

(10-17-2012, 05:33 PM)Statyk Wrote: You are trying to call a specific .ogg, while PlaySoundAtEntity searches for .snt. You can either make your own .snt using Notepad/Notepad++ and have the game read that, or you can have it read:

PlaySoundAtEntity("", "21_screams", "Player", 0.0f, false);
I don't understand the differences between .ogg and .snt! The sound I want to call the "21_scream10" but it wont work! Sad


RE: PlaySoundAtEntity not working :( I need HELP! - brute360 - 10-17-2012

You need to create your own .snt file
Copy the text below and save text file as an .snt

<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="21_scream10.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="5" MaxDistance="40" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.8" Priority="0" />
</SOUNDENTITY>


RE: PlaySoundAtEntity not working :( I need HELP! - FlawlessHappiness - 10-17-2012

You cannot play .ogg files with the PlaySoundAtEntity.
What you do is playing .snt files.
The 21_screams.snt is a bunch of scream-sounds put together in 1 .snt file, so if you call the 21_screams.snt then you will get a random scream-sound


RE: PlaySoundAtEntity not working :( I need HELP! - 4WalledKid - 10-17-2012

(10-17-2012, 07:19 PM)beecake Wrote: You cannot play .ogg files with the PlaySoundAtEntity.
What you do is playing .snt files.
The 21_screams.snt is a bunch of scream-sounds put together in 1 .snt file, so if you call the 21_screams.snt then you will get a random scream-sound
So what is and .ogg sound? And what about if I want one specific sound from the 21_screams.snt?