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
Script Help How to play sound and area?
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: How to play sound and area?

Where do you want to play this sound? Is it ambient or on the player? If it's a sound on the player, like a gasp or reaction, you usually play it on the player using PlayGuiSound. Otherwise, if the sound has a source in the level, use PlaySoundAtEntity. Use either one along with a collision callback to trigger it when the player enters an area.

PHP Code: (Select All)
AddEntityCollideCallback("Player""AreaName""FuncName"true1);
PlaySoundAtEntity("SoundName""SoundFile.snt""EntityName"0false); 

(This post was last modified: 01-15-2015, 10:01 PM by Mudbill.)
01-15-2015, 11:51 AM
Find


Messages In This Thread
How to play sound and area? - by MaksoPL - 01-15-2015, 11:32 AM
RE: How to play sound and area? - by Mudbill - 01-15-2015, 11:51 AM
RE: How to play sound and area? - by DnALANGE - 01-15-2015, 02:31 PM
RE: How to play sound and area? - by Mudbill - 01-15-2015, 10:00 PM



Users browsing this thread: 1 Guest(s)