07-17-2011, 02:35 AM
Hey Guys i need some help
I want 4 Lights to be lit as soon as you get trough a door.
These an area next to the door which should start the event which turns the lights on + gives you sanity/plays sound.
Heres my code:
It isn't working for me.
Could someone help me?
I want 4 Lights to be lit as soon as you get trough a door.
These an area next to the door which should start the event which turns the lights on + gives you sanity/plays sound.
Heres my code:
Code:
{
AddEntityCollideCallback("Player", "TriggerLight", "soundsan", true, 1);
AddEntityCollideCallback("Player", "TriggerLight", "lightson", true, 1);
}
void soundsan(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
void lightson(string& asName, bool abLit, bool abEffects)
{
SetLampLit("candle_*",true, false);
}
Could someone help me?