Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
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.
|
|
01-11-2012, 10:43 PM |
|
eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
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 |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: Timer help
Nothing is wrong with it by the looks of it.
|
|
01-11-2012, 10:48 PM |
|
eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
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 |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: Timer help
Try something other than "StartGame"... I'm sorry, Idk what else.
|
|
01-11-2012, 10:50 PM |
|
eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
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 |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
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.
|
|
01-11-2012, 10:58 PM |
|
eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
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 |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
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 |
|
eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
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 |
|
|