The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 doesn't work
bartimeus Offline
Junior Member

Posts: 20
Threads: 6
Joined: Jun 2012
Reputation: 0
#1
PlaySoundAtEntity doesn't work

Hi
I tried to make a script which is supposed to play a sound near the player when he pick up a key.

Here's the script:


void OnStart()
{
SetEntityPlayerInteractCallback("keyhouse", "bruit", true);
}
void bruit(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound)
{
PlaySoundAtEntity("", "hit_wood", "areabruit", 0, false);
PlaySoundAtEntity("", "attack_launch", "areabruit", 0, false);
}

The problem is that I can't hear any noise. I tried adding .snt at the end of the files, I tried to replace areabruit with a box or a door, and I still can't hear anything.
(This post was last modified: 06-19-2012, 09:38 PM by bartimeus.)
06-19-2012, 06:50 PM
Find


Messages In This Thread
PlaySoundAtEntity doesn't work - by bartimeus - 06-19-2012, 06:50 PM
RE: PlaySoundAtEntity doesn't work - by i3670 - 06-19-2012, 06:59 PM
RE: PlaySoundAtEntity doesn't work - by bartimeus - 06-19-2012, 07:08 PM
RE: PlaySoundAtEntity doesn't work - by i3670 - 06-19-2012, 07:10 PM



Users browsing this thread: 1 Guest(s)