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 Make a sound play when you pick up a note
Iyiyt Offline
Junior Member

Posts: 13
Threads: 5
Joined: Jul 2012
Reputation: 0
#10
RE: Make a sound play when you pick up a note

Hey everybody! I was messing around with my script a little, and I stumbled upon a script that actually worked! This is what I did;
1. I deleted the sound "Commie" from my .MAP file.
2. I changed the name of the .snt file to "Commie.snt"
3. I had it say "PlayGuiSound("Commie.snt", 1.0f);
4. I turned SetEntityPlayerCallback to false.

And it worked! Now it plays the sound only when you pick up the note! Thanks for all your help. Consider this problem solved.

Oh, and in case you want to see, here is the code;
///////////////////////////
//Run when entering map
void OnStart()
{
SetEntityPlayerInteractCallback("Chris", "play", false);
}

void play(string &in asEntity, string &in asType)
{
SetEntityActive("GruntUno", true);
PlayGuiSound("Commie.snt", 1.0f);
}
(This post was last modified: 07-26-2012, 04:48 AM by Iyiyt.)
07-26-2012, 04:47 AM
Find


Messages In This Thread
RE: Make a sound play when you pick up a note - by Iyiyt - 07-26-2012, 04:47 AM



Users browsing this thread: 2 Guest(s)