Frictional Games Forum (read-only)

Full Version: PlaySoundAtEntity not working :( (Help Needed!)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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!
I think you need to put something between the first quotation marks.
(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??
Try typing "Test" and see if that works.
(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!
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);
(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
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>
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
(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?
Pages: 1 2