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
More advance coding (for me)
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: More advance coding (for me)

To question 1, I can't answer it because I tried so many times before and it wouldn't work. :/

To question 2, It should work.

Example. The player collides with ScriptArea_1 and then looks at some place called ScriptArea_2 and then 2 seconds later, looks at ScriptArea_3.

void OnStart()
{
     AddEntityCollideCallback("Player", "ScriptArea_1", "Func01", true, 1);
}
void Func01(string &in asParent, string &in asChild, int alState)
{
     StartPlayerLookAt("ScriptArea_2", 2, 2, "");
     AddTimer("T1", 1.5, "Func02");
     AddTimer("T2", 2, "Func02");
     AddTimer("T3", 3.5, "Func02");
}
void Func02(string &in asTimer)
{
     string x = asTimer;
     if (x == "T1")
     {
          StopPlayerLookAt();
          return;
     }
     else if (x == "T2")
     {
          StartPlayerLookAt("ScriptArea_3", 2, 2, "");
          return;
     }
     else if (x == "T3")
     {
          StopPlayerLookAt();
          return;
     }
}

To question 3, maybe have big rooms with unlit areas with creeping doors making the player assume that something is there. :/

05-29-2011, 01:39 PM
Find


Messages In This Thread
More advance coding (for me) - by X4anco - 05-29-2011, 12:49 PM
RE: More advance coding (for me) - by Kyle - 05-29-2011, 01:39 PM
RE: More advance coding (for me) - by X4anco - 05-29-2011, 02:01 PM
RE: More advance coding (for me) - by Kyle - 05-29-2011, 02:22 PM



Users browsing this thread: 1 Guest(s)