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
Fadein help
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#39
RE: Timer help

(01-11-2012, 11:01 PM)eagledude4 Wrote:
(01-11-2012, 10:43 PM)Statyk Wrote: void OnStart()
{
AddTimer("FadeTimer", 5, "StartGame");
FadeOut(0);
}


void StartGame(string &in asTimer)
{
SetPlayerActive(true);
FadeIn(1);
}


//It should look JUST like that.

I want it to fade from black as soon as the game starts, not after the timer ends. I'm trying to simulate the player waking up. The time I want it to take to fade is 5 seconds, so why doesn't my code work?

You are going to need another timer then... Try this:



void OnStart()
{
AddTimer("FadeTimer", 5, "StartGame");
AddTimer("", 0.5f, "Fadeinfunc");
FadeOut(0);
}

void Fadeinfunc(string &in asTimer)
{
FadeIn(5);
}


void StartGame(string &in asTimer)
{
SetPlayerActive(true);
}
(This post was last modified: 01-11-2012, 11:15 PM by Statyk.)
01-11-2012, 11:13 PM
Find


Messages In This Thread
Fadein help - by eagledude4 - 01-02-2012, 06:03 PM
RE: Timer help - by Statyk - 01-02-2012, 06:16 PM
RE: Timer help - by Your Computer - 01-02-2012, 08:38 PM
RE: Timer help - by eagledude4 - 01-02-2012, 11:09 PM
RE: Timer help - by eagledude4 - 01-03-2012, 12:39 AM
RE: Timer help - by Your Computer - 01-03-2012, 02:37 AM
RE: Timer help - by Statyk - 01-03-2012, 02:08 AM
RE: Timer help - by eagledude4 - 01-03-2012, 03:55 AM
RE: Timer help - by Statyk - 01-03-2012, 04:01 AM
RE: Timer help - by eagledude4 - 01-03-2012, 04:04 AM
RE: Timer help - by Statyk - 01-03-2012, 04:16 AM
RE: Timer help - by eagledude4 - 01-03-2012, 05:34 AM
RE: Timer help - by Statyk - 01-03-2012, 09:16 PM
RE: Timer help - by eagledude4 - 01-05-2012, 12:59 AM
RE: Timer help - by Your Computer - 01-03-2012, 09:14 PM
RE: Timer help - by Statyk - 01-05-2012, 02:03 AM
RE: Timer help - by eagledude4 - 01-05-2012, 02:09 AM
RE: Timer help - by Statyk - 01-05-2012, 02:21 AM
RE: Timer help - by eagledude4 - 01-05-2012, 02:25 AM
RE: Timer help - by flamez3 - 01-05-2012, 03:43 AM
RE: Timer help - by Statyk - 01-05-2012, 03:49 AM
RE: Timer help - by flamez3 - 01-05-2012, 03:54 AM
RE: Timer help - by eagledude4 - 01-05-2012, 05:21 AM
RE: Timer help - by flamez3 - 01-05-2012, 05:29 AM
RE: Timer help - by eagledude4 - 01-05-2012, 05:36 AM
RE: Timer help - by flamez3 - 01-05-2012, 05:57 AM
RE: Timer help - by eagledude4 - 01-05-2012, 05:58 AM
RE: Timer help - by eagledude4 - 01-11-2012, 10:01 PM
RE: Timer help - by Statyk - 01-11-2012, 10:15 PM
RE: Timer help - by eagledude4 - 01-11-2012, 10:40 PM
RE: Timer help - by Statyk - 01-11-2012, 10:43 PM
RE: Timer help - by eagledude4 - 01-11-2012, 10:45 PM
RE: Timer help - by Statyk - 01-11-2012, 10:58 PM
RE: Timer help - by eagledude4 - 01-11-2012, 11:01 PM
RE: Timer help - by Statyk - 01-11-2012, 11:13 PM
RE: Timer help - by eagledude4 - 01-13-2012, 03:36 AM
RE: Timer help - by Statyk - 01-11-2012, 10:48 PM
RE: Timer help - by eagledude4 - 01-11-2012, 10:49 PM
RE: Timer help - by Statyk - 01-11-2012, 10:50 PM
RE: Timer help - by eagledude4 - 01-11-2012, 10:52 PM



Users browsing this thread: 2 Guest(s)