10-14-2011, 10:15 PM
I want to make it so when i walk into an area, you look at the monster (which walks to a patrol node) for a period of time then it stops, when it reaches the path rode is disappears.
It won't work here is my script:
It won't work here is my script:
Code:
void OnStart(){AddEntityCollideCallback("Player", "ScareOne", "ScareOne", true, 1);}
{AddEntityCollideCallback("Player", "ScareTwoArea", "ScareTwo", true, 1);}
void ScareOne(string &in asParent, string &in asChild, int alState){SetLampLit("ScareOneLight", true, true);SetLampLit("ScareOneLightTwo", true, true);SetEntityActive("ScareOneMonster", true);ShowEnemyPlayerPosition("ScareOneMonster");PlaySoundAtEntity("", "react_scare3.ogg", "Player", 10.0f, true);PlayMusic("LevelOneMusic", true, 10.0f, 2.0f, 2.0f, true);SetSwingDoorLocked("ScareOneDoor", true, true);}
void ScareTwo(string &in asParent, string &in asChild, int alState){AddEnemyPatrolNode("ScareTwoMonster", "ScareTwo", 10.0f, "");StartPlayerLookAt("ScareTwoMonster", 5.0f, 6.0f, "");AddTimer("ScareTwo", 3.0f, "ScareTimerTwo");}
void ScareTimerTwo(string &in asTimer){StopPlayerLookAt();}
void OnEnter(){}void OnLeave(){}