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
#7
RE: Make a sound play when you pick up a note

That still doesn't work. On the plus side, when I try to run my script it doesn't have a fatal error (hooray!), but it still just plays the sound when you spawn in, and doesn't when you click the note. Here's my current code
///////////////////////////
//Run when entering map
void OnStart()
{
SetEntityPlayerInteractCallback("Chris", "SpawnGruntUno", true);
SetEntityCallbackFunc("Chris", "Commie");
}

void SpawnGruntUno(string &in asEntity)
{
SetEntityActive("GruntUno", true);
}

void Commie(string &in asEntity, string &in type)
{
PlaySoundAtEntity("", "amb_hunt.snt", "Player", 0, false);
}

The other way, with the playnotesound, looks like this;
///////////////////////////
//Run when entering map
void OnStart()
{
SetEntityPlayerInteractCallback("Chris", "SpawnGruntUno", true);
}

void SpawnGruntUno(string &in asEntity)
{
SetEntityActive("GruntUno", true);
}

void playnotesound(string &in Entity, string& in type)
{
PlayGuiSound("Commie", 1.0f);
}
Thanks for all your help guys, but it still just isn't working. By the way, before you ask, yes I'm sure the names are accurate and that I put playnotesound (with no caps) in the function-thing text box.
(This post was last modified: 07-22-2012, 06:55 PM by Iyiyt.)
07-22-2012, 06:54 PM
Find


Messages In This Thread
RE: Make a sound play when you pick up a note - by Iyiyt - 07-22-2012, 06:54 PM



Users browsing this thread: 1 Guest(s)