Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PlaySoundAtEntity not working :( (Help Needed!)
4WalledKid Offline
Member

Posts: 107
Threads: 23
Joined: Oct 2012
Reputation: 1
#1
Question  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
PHP Code: (Select All)
PlaySoundAtEntity("""21_scream10""Player"0.0ffalse); 
but it wont work! I don't know why? Thanks!

[Image: 4walledkidbanner_zps1514b7f6.png]
(This post was last modified: 10-26-2012, 11:49 AM by 4WalledKid.)
10-17-2012, 04:58 PM
Website Find
brute360 Offline
Junior Member

Posts: 31
Threads: 0
Joined: Apr 2012
Reputation: 0
#2
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
Find
4WalledKid Offline
Member

Posts: 107
Threads: 23
Joined: Oct 2012
Reputation: 1
#3
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??

[Image: 4walledkidbanner_zps1514b7f6.png]
10-17-2012, 05:29 PM
Website Find
brute360 Offline
Junior Member

Posts: 31
Threads: 0
Joined: Apr 2012
Reputation: 0
#4
RE: PlaySoundAtEntity not working :( I need HELP!

Try typing "Test" and see if that works.
10-17-2012, 05:32 PM
Find
4WalledKid Offline
Member

Posts: 107
Threads: 23
Joined: Oct 2012
Reputation: 1
#5
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


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

Thanks for the reply anyway!

[Image: 4walledkidbanner_zps1514b7f6.png]
(This post was last modified: 10-17-2012, 05:33 PM by 4WalledKid.)
10-17-2012, 05:33 PM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#6
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
Find
4WalledKid Offline
Member

Posts: 107
Threads: 23
Joined: Oct 2012
Reputation: 1
#7
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! Sad

[Image: 4walledkidbanner_zps1514b7f6.png]
(This post was last modified: 10-17-2012, 05:46 PM by 4WalledKid.)
10-17-2012, 05:42 PM
Website Find
brute360 Offline
Junior Member

Posts: 31
Threads: 0
Joined: Apr 2012
Reputation: 0
#8
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
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#9
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
Find
4WalledKid Offline
Member

Posts: 107
Threads: 23
Joined: Oct 2012
Reputation: 1
#10
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?

[Image: 4walledkidbanner_zps1514b7f6.png]
10-17-2012, 09:39 PM
Website Find




Users browsing this thread: 1 Guest(s)