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
Trigger lamps
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#2
RE: Trigger lamps

You don't need two callback commands for the same script area, all you need to do is delete one callback command and move it's callback function into the other's.
void OnStart()
{
AddEntityCollideCallback("Player", "TriggerLight", "soundsan", true, 1);
}

void soundsan(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);  
GiveSanityDamage(5.0f, true);
SetLampLit("candle_*", true, false);
}


void OnEnter()
{
}

void OnLeave()
{
}
and for the lamp, is "candle_*" what you really named it?
07-17-2011, 03:24 AM
Find


Messages In This Thread
Trigger lamps - by Glain - 07-17-2011, 02:35 AM
RE: Trigger lamps - by Zypherzemus - 07-17-2011, 03:24 AM
RE: Trigger lamps - by Glain - 07-17-2011, 03:31 AM
RE: Trigger lamps - by palistov - 07-17-2011, 09:11 AM



Users browsing this thread: 1 Guest(s)