what a coincidence , i was just doing the same script for the first time
what i
think is that you cant use a Area, because a Area doesn't have a Callback.
they LookAt script doesnt work either for me ; SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);
what i did was putting the LookAt at a object and made a Callback
void Scare_GruntFood(string &in entity, int alState)
{
AddDebugMessage("LookAt" + "'s current state: " + alState, false);
if (alState == 1)
{
SetEntityPlayerLookAtCallback("", "", true);
GiveSanityDamage(50, true);
PlaySoundAtEntity("Breath", "react_pant.snt", "Player", 0, false);
}
}
the only thing you have to do is putting your callback in the level editor, in the PlayerLookAtCallback ofcourse
. and be sure to click the PlayerLookAtCallBackAutoRemo option in the level editor Entity
if anybody know how the LookAtCallBack script works and if it is possible at a Area, please reply. You'll help us both, hehe