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
Need help with script
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#4
RE: Need help with script

In addition to what CptLogicDev said, since you want the sound to play when the player enters an area...

You need AddEntityCollideCallback in OnStart, like this

void OnStart()
{
AddEntityCollideCallback("Player", "YOUR AREA NAME HERE", "PlaySound", true, 1);
}

void PlaySound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "sound file with snt", "what entity the sound plays on", i use 1 often, save the sound true or false);
}

It's all in here... http://wiki.frictionalgames.com/hpl2/amn..._functions
12-28-2012, 01:52 PM
Find


Messages In This Thread
Need help with script - by Slanderous - 12-27-2012, 04:59 PM
RE: Need help with script - by Traggey - 12-27-2012, 05:24 PM
RE: Need help with script - by CptLogicDev - 12-27-2012, 06:58 PM
RE: Need help with script - by Adrianis - 12-28-2012, 01:52 PM
RE: Need help with script - by Slanderous - 12-29-2012, 11:17 PM



Users browsing this thread: 1 Guest(s)