Script - Icaab2607 - 07-05-2013
Tell me,whereins fault of this script,on idea, should a player become active, and monster no active.
But of this, nothing happens:
Code: 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);
}
RE: Script - Kullin - 07-05-2013
(07-05-2013, 08:06 PM)Icaab2607 Wrote: Tell me,whereins fault of this script,on idea, should a player become active, and monster no active.
But of this, nothing happens:
Code: 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);
}
Whats the "Grunt"? A script area?
Edit: try this
Code: 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 asTimer)
{
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);
}
|