4WalledKid
Member
Posts: 107
Threads: 23
Joined: Oct 2012
Reputation:
1
|
PlaySoundAtEntity not working :( (Help Needed!)
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 PlaySoundAtEntity("", "21_scream10", "Player", 0.0f, false);
but it wont work! I don't know why? Thanks!
(This post was last modified: 10-26-2012, 11:49 AM by 4WalledKid.)
|
|
10-17-2012, 04:58 PM |
|
brute360
Junior Member
Posts: 31
Threads: 0
Joined: Apr 2012
Reputation:
0
|
RE: PlaySoundAtEntity not working :( I need HELP!
I think you need to put something between the first quotation marks.
|
|
10-17-2012, 05:19 PM |
|
4WalledKid
Member
Posts: 107
Threads: 23
Joined: Oct 2012
Reputation:
1
|
RE: PlaySoundAtEntity not working :( I need HELP!
(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??
|
|
10-17-2012, 05:29 PM |
|
brute360
Junior Member
Posts: 31
Threads: 0
Joined: Apr 2012
Reputation:
0
|
RE: PlaySoundAtEntity not working :( I need HELP!
Try typing "Test" and see if that works.
|
|
10-17-2012, 05:32 PM |
|
4WalledKid
Member
Posts: 107
Threads: 23
Joined: Oct 2012
Reputation:
1
|
RE: PlaySoundAtEntity not working :( I need HELP!
(10-17-2012, 05:32 PM)brute360 Wrote: Try typing "Test" and see if that works. I got it! Is this
PreloadSound("L01_screams.snt"); PlaySoundAtEntity("", "L01_screams", "Player", 0.0f, false);
Thanks for the reply anyway!
(This post was last modified: 10-17-2012, 05:33 PM by 4WalledKid.)
|
|
10-17-2012, 05:33 PM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: PlaySoundAtEntity not working :( I need HELP!
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 |
|
4WalledKid
Member
Posts: 107
Threads: 23
Joined: Oct 2012
Reputation:
1
|
RE: PlaySoundAtEntity not working :( I need HELP!
(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!
(This post was last modified: 10-17-2012, 05:46 PM by 4WalledKid.)
|
|
10-17-2012, 05:42 PM |
|
brute360
Junior Member
Posts: 31
Threads: 0
Joined: Apr 2012
Reputation:
0
|
RE: PlaySoundAtEntity not working :( I need HELP!
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>
|
|
10-17-2012, 05:56 PM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: PlaySoundAtEntity not working :( I need HELP!
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
Trying is the first step to success.
|
|
10-17-2012, 07:19 PM |
|
4WalledKid
Member
Posts: 107
Threads: 23
Joined: Oct 2012
Reputation:
1
|
RE: PlaySoundAtEntity not working :( I need HELP!
(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?
|
|
10-17-2012, 09:39 PM |
|
|