Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
script
Author Message
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #4
RE: script

And that leads to the 2nd way to do it. I'll have to combine both of them for it to work. Try this:

void OnStart()
{
     FadeOut(0);
     FadeIn(5);
     SetPlayerActive(false);
     SetPlayerCrouching(true);
     SetInventoryDisabled(true);
     MovePlayerHeadPos(0, -2, 0, 2, -2);
     StartPlayerLookAt("ScriptArea_1", 10, 10, "");
     AddTimer("T1", 5.5, "TimerFunc");
     AddTimer("T2", 10, "TimerFunc");
     AddTimer("T3", 13.5, "TimerFunc");
     AddTimer("T4", 16, "TimerFunc");
}
void TimerFunc(string &in asTimer)
{
     string x = asTimer;
     if (x == "T1")
     {
          FadeOut(4);
          PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
     }
     else if (x == "T2")
     {
          FadeIn(3);
     }
     else if (x == "T3")
     {
          FadeOut(2);
          StopPlayerLookAt();
          PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
          MovePlayerHeadPos(0, 2, 0, 2, 2);
     }
     else if (x == "T4")
     {
          FadeIn(2);
          SetPlayerActive(true);
          SetPlayerCrouching(false);
          SetInventoryDisabled(false);
          PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
     }
}

I'm not sure if the numbers would make the correct effect work correctly, but I do know that it will do something. ^^

07-30-2011 08:49 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
script - zecuro - 07-30-2011, 07:58 PM
RE: script - Kyle - 07-30-2011, 08:12 PM
RE: script - zecuro - 07-30-2011, 08:42 PM
RE: script - Kyle - 07-30-2011 08:49 PM



User(s) browsing this thread: 1 Guest(s)