void OnStart()
{
AddTimer("", 1, "AmountOfSanity");
}
void AmountOfSanity(string &in asTimer)
{
if(GetPlayerSanity() < 100.0f)
{
PlaySoundAtEntity("Player", "insanity_whisper.snt", "Player", 0, false);
PlaySoundAtEntity("Player", "insanity_baby_cry.snt", "Player", 0, false);
}
}
So , I need a normal script, if sanity is lower than x amount, in my case is 100 for test, player hears insane sounds. But in my script its not happening. Anybody can give me a working script example?
I putted many scare areas and get 0 sanity but nothing...
Thanks, + reputation for man that will help me