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
Adding a Sound Triggered by an Area
Nye Offline
Senior Member

Posts: 250
Threads: 8
Joined: Jan 2011
Reputation: 2
#9
RE: Adding a Sound Triggered by an Area

(03-02-2011, 09:37 PM)Samuelblitz Wrote:
(03-02-2011, 08:17 AM)Russ Money Wrote:
Quote:enabled.snt is one of the grunt's sound files and i tried the fade at 0.0f but still no sound in-game,

just out of curiosity, is this a common problem? or is it just my game specifically?

Most likely just a coding or some small detail we're overlooking. Just for testing sake, try this instead.


PlaySoundAtEntity("", "enabled.snt", "Player", 0.0f, false);

It'll play directly on the player, letting them hear it regardless. If it doesn't play, it's .snt file. Which alternatively, you can try a different .snt and test that.

Ahh, that worked perfectly! Thank you very much.

However are there any disadvantages to playing the sound directly from "Player"? Because i was planning to have quite a few triggered sounds and i might end up having to use this method for all of them.

The issue here, which I found out the hard way, you CANNOT play sounds from entities. As silly as it sounds, there are a few exceptions, like the player. And don't stick to the partial solution, since you might as well play a GuiSound if you want to play a sound from the player.

The solution is to create a script area and play the sound from that script area.

Sleepy

03-02-2011, 09:45 PM
Find


Messages In This Thread
RE: Adding a Sound Triggered by an Area - by Nye - 03-02-2011, 09:45 PM



Users browsing this thread: 1 Guest(s)