10-13-2013, 08:30 PM
Well, all i want to do is activate little scary event sound (2-4 sec long) by passing through Area.
But my script for it doesn´t work , i hoped that it would work but no.
Here is my script:
void OnStart()
{
AddEntityCollideCallback("Player", "SoundTrigger1", "SoundCollide", true, 1);
}
void SoundCollide(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound)
{
PlaySoundAtEntity("Whisper1", "afx_spooky_stereo_whisper1", "Player", 1.0, false);
}
But my script for it doesn´t work , i hoped that it would work but no.
Here is my script:
void OnStart()
{
AddEntityCollideCallback("Player", "SoundTrigger1", "SoundCollide", true, 1);
}
void SoundCollide(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound)
{
PlaySoundAtEntity("Whisper1", "afx_spooky_stereo_whisper1", "Player", 1.0, false);
}