Tell me,whereins fault of this script,on idea, should a player become active, and monster no active.
But of this, nothing happens:
void OnStart()
{
AddEntityCollideCallback("Player", "Grunt", "Grunt", true, 1);
}
void Grunt(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "rnd2.snt", "Player", 0, false);
SetEntityActive("servant_grunt_ragdoll_1", true);
StartPlayerLookAt("LOOKGRUNT", 1, 1, "");
AddTimer("", 4.0f, "stoplooking2");
}
void stoplooking2(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5.0f, true);
AddPropForce("servant_grunt_ragdoll_1", 5000.0f, 0.0f, 0.0f, "world");
StopPlayerLookAt();
SetPlayerActive(true);
SetEntityActive("servant_grunt_ragdoll_1", false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
}