ammislol
Junior Member
Posts: 24
Threads: 6
Joined: Feb 2012
Reputation:
0
|
RE: Need some script help!
(02-26-2012, 04:38 PM)Obliviator27 Wrote: void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_5", "StartLookSequence", true, 1);
}
void StartLookSequence(string &in asParent, string &in asChild, int alState)
{
AddTimer("LookTimer1", 4, "NextLook");
AddTimer("LookTimer2", 8, "NextLook");
AddTimer("LookTimer3", 12, "NextLook");
AddTimer("LookTimer4", 16, "NextLook");
StartPlayerLookAt("ScriptArea_1", 2, 2, "");
}
void NextLook(string &in asTimer)
{
if(asTimer == "LookTimer1")
{
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_2", 2, 2, "");
}
if(asTimer == "LookTimer2")
{
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_3", 2, 2, "");
}
if(asTimer == "LookTimer3")
{
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_4", 2, 2, "");
}
if(asTimer == "LookTimer4")
{
StopPlayerLookAt();
SetEntityActive("servant_grunt_1", true);
ShowEnemyPlayerPosition("servant_grunt_1");
}
}
Bolded areas are what I altered. Yeah works now, but if i turn around and try to run away from the monster I enter the area again - and the player starts to look at area_1,2,3,4 again. Is there anyway to make it so the player only look ONCE and not everytime he enters area_5?
|
|
02-26-2012, 05:22 PM |
|