04-03-2011, 09:33 PM
I wanted to have my character get scared when looking at something, but it doesnt seem to work, tell me whats wrong with this.
PHP Code:
////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityPlayerLookAtCallback(pig, ScarePig, false);
}
void ScarePig(string &in entity, int alState)
{
GiveSanityDamage(10.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
}