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
Sound trigger
Shoop Offline
Junior Member

Posts: 36
Threads: 10
Joined: Feb 2011
Reputation: 0
#1
Sound trigger

I want it so when the player walks to a certain spot they will here a noise, I am guessing I need to have it like this:
AddEntityCollideCallback("Player", "SoundArea1", "Soundtrigger1", true, 1);
I need a void script to play a sound, if that would work. If not, does anybody know what I could do, the only thing I could think of was fade in sound.
(This post was last modified: 04-21-2011, 03:37 PM by Shoop.)
04-21-2011, 03:36 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Sound trigger

Why not try first?
And yeah, it would work.

04-21-2011, 03:41 PM
Website Find
Shoop Offline
Junior Member

Posts: 36
Threads: 10
Joined: Feb 2011
Reputation: 0
#3
RE: Sound trigger

I don't know a void function for just playing a single sound without fading, that is basically what I am asking.
Would this work?
AddEntityCollideCallback("Player", "SoundArea", "SoundTrigger1", true, 1);
void SoundTrigger1(string &in asParent , string &in asChild , int alState)
{
  SetEntityActive("whisper" , true);
}
Put together better of course, and with a proper sound that I would put into the map.
(This post was last modified: 04-21-2011, 03:48 PM by Shoop.)
04-21-2011, 03:43 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#4
RE: Sound trigger

Just use PlaySoundAtEntity, it's in the wiki.
04-21-2011, 04:09 PM
Find
Shoop Offline
Junior Member

Posts: 36
Threads: 10
Joined: Feb 2011
Reputation: 0
#5
RE: Sound trigger

I didn't even think of it that way, thank you.
04-21-2011, 06:06 PM
Find




Users browsing this thread: 1 Guest(s)