Obliviator27
Posting Freak
Posts: 792
Threads: 10
Joined: Jul 2011
Reputation:
66
|
RE: Need some script help!
(02-24-2012, 09:53 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("LookTimee4", 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");
}
}
I typed it out hastily. This code should be the fixed one.
What happens is when you hit ScriptArea_5, it forces the player to look at one of the areas and activates a few timers. As each timer runs out, the player looks at the subsequent areas.
|
|
02-24-2012, 10:12 PM |
|