Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Need some script help!
ammislol Offline
Junior Member

Posts: 24
Threads: 6
Joined: Feb 2012
Reputation: 0
#8
RE: Need some script help!

(02-24-2012, 10:12 PM)Obliviator27 Wrote:
(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.
Okay it works great, tho ive got 2 questions.
1. is there anyway to like lock the camera on each area? Cause now you can move the mouse around while the camera look at each area.

2. when it takes me to area 4, it just stands there and look - it wont release. and no monster is spawning.

Huge thanks in advance
02-24-2012, 10:19 PM
Find


Messages In This Thread
Need some script help! - by ammislol - 02-24-2012, 04:43 PM
RE: Need some script help! - by ammislol - 02-24-2012, 08:47 PM
RE: Need some script help! - by Obliviator27 - 02-24-2012, 09:09 PM
RE: Need some script help! - by ammislol - 02-24-2012, 09:43 PM
RE: Need some script help! - by Obliviator27 - 02-24-2012, 09:53 PM
RE: Need some script help! - by ammislol - 02-24-2012, 09:57 PM
RE: Need some script help! - by Obliviator27 - 02-24-2012, 10:12 PM
RE: Need some script help! - by ammislol - 02-24-2012, 10:19 PM
RE: Need some script help! - by Obliviator27 - 02-24-2012, 11:29 PM
RE: Need some script help! - by ammislol - 02-24-2012, 11:42 PM
RE: Need some script help! - by Obliviator27 - 02-24-2012, 11:45 PM
RE: Need some script help! - by ammislol - 02-24-2012, 11:56 PM
RE: Need some script help! - by flamez3 - 02-26-2012, 10:29 AM
RE: Need some script help! - by ammislol - 02-26-2012, 11:43 AM
RE: Need some script help! - by Obliviator27 - 02-26-2012, 04:38 PM
RE: Need some script help! - by ammislol - 02-26-2012, 05:22 PM
RE: Need some script help! - by Obliviator27 - 02-26-2012, 05:31 PM
RE: Need some script help! - by ammislol - 02-26-2012, 05:39 PM
RE: Need some script help! - by Obliviator27 - 02-26-2012, 05:39 PM



Users browsing this thread: 5 Guest(s)