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
Fadein help
Author Message
Statyk Offline
Modmau5

Posts: 4,186
Joined: Sep 2011
Reputation: 230
Post: #31
RE: Timer help

How hard is your timer??

//____________________

void OnStart()
{
AddTimer("", 5, "Timer_function");
}

void Timer_function(string &in asTimer)
{
//functions go here
}


//_________________

Timer, done in 5 seconds.

[Image: kebCbZ]
01-11-2012 10:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #32
RE: Timer help

(01-11-2012 10:43 PM)Statyk Wrote:  How hard is your timer??

//____________________

void OnStart()
{
FadeIn(5);
AddTimer("", 5, "Timer_function");
}

void Timer_function(string &in asTimer)
{
//functions go here
}


//_________________

Timer, done in 5 seconds.

I already have that >.>

AddTimer("FadeTimer", 5, "StartGame");

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

I didn't ask you to make a timer for me, I'm asking what's wrong with mine.

Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-11-2012 10:51 PM by eagledude4.)
01-11-2012 10:45 PM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 4,186
Joined: Sep 2011
Reputation: 230
Post: #33
RE: Timer help

Nothing is wrong with it by the looks of it.

[Image: kebCbZ]
01-11-2012 10:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #34
RE: Timer help

(01-11-2012 10:48 PM)Statyk Wrote:  Nothing is wrong with it by the looks of it.
That's the conclusion I've come to as well, but it WONT work.

Its hard to see the truth when you've been blinded by lies.
01-11-2012 10:49 PM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 4,186
Joined: Sep 2011
Reputation: 230
Post: #35
RE: Timer help

Try something other than "StartGame"... I'm sorry, Idk what else.

[Image: kebCbZ]
01-11-2012 10:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #36
RE: Timer help

(01-11-2012 10:50 PM)Statyk Wrote:  Try something other than "StartGame"... I'm sorry, Idk what else.
Sorry, I should have been more clear. The timer works. After 5 seconds I am able to move again (which the timer does), but the fadein doesn't work.

Its hard to see the truth when you've been blinded by lies.
01-11-2012 10:52 PM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 4,186
Joined: Sep 2011
Reputation: 230
Post: #37
RE: Timer help

(01-11-2012 10:45 PM)eagledude4 Wrote:  
(01-11-2012 10:43 PM)Statyk Wrote:  How hard is your timer??

//____________________

void OnStart()
{
FadeIn(5);
AddTimer("", 5, "Timer_function");
}

void Timer_function(string &in asTimer)
{
//functions go here
}


//_________________

Timer, done in 5 seconds.

I already have that >.>

AddTimer("FadeTimer", 5, "StartGame");

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

I didn't ask you to make a timer for me, I'm asking what's wrong with mine.
void OnStart()
{
AddTimer("FadeTimer", 5, "StartGame");
FadeOut(0);
}


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


//It should look JUST like that.

[Image: kebCbZ]
01-11-2012 10:58 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #38
RE: Timer help

(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?

Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-11-2012 11:02 PM by eagledude4.)
01-11-2012 11:01 PM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 4,186
Joined: Sep 2011
Reputation: 230
Post: #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);
}

[Image: kebCbZ]
(This post was last modified: 01-11-2012 11:15 PM by Statyk.)
01-11-2012 11:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #40
RE: Timer help

(01-11-2012 11:13 PM)Statyk Wrote:  
(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);
}
thank you.

Its hard to see the truth when you've been blinded by lies.
01-13-2012 03:36 AM
Find all posts by this user Quote this message in a reply
Post Reply 




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