Need help with variable timer

Status
Not open for further replies.

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
331
Reaction score
90
First Language
English
Primarily Uses
N/A
So I have a "timer" that's three variables: one is the hour, the second is the minute, and the third is the seconds. Every second I want the third variable to reset to 0 and every 59 seconds the second variable to reset to 0. That way it acts like a timer. But I have three problems:

1. for the third variable, I don't know how to speed up a variable so it counts up to 59 in a second
2. for the second variable, I don't know how long 59 seconds is in the game's time (1 sec? 60 sec?)
3. for the first variable, I don't know how long an hour is in the game's time (300 sec? 6000 sec?)

I'm making this "timer" because I can't find a way to display the real timer in a text box.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
A few questions, because I don't really understand your 3 problems:

1. for the third variable, I don't know how to speed up a variable so it counts up to 59 in a second
I don't understand this, why do you want your "third variable" (seconds) to count up to 59 in a second?
Wouldn't you want your "seconds" variable to increase by 1 each second?

2. for the second variable, I don't know how long 59 seconds is in the game's time (1 sec? 60 sec?)
59 seconds is equivalent to 59 seconds in game time.
The game is supposed to run at 60 frames per second (fps). 59 seconds * 60 frames / second = 3540 frames

3. for the first variable, I don't know how long an hour is in the game's time (300 sec? 6000 sec?)
An hour in game time is the same as an hour in real life --> 1 hour = 60 minutes = 3600 seconds


Here is a simple example of an evented timer Common Event:
Timer.png
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
331
Reaction score
90
First Language
English
Primarily Uses
N/A
A few questions, because I don't really understand your 3 problems:


I don't understand this, why do you want your "third variable" (seconds) to count up to 59 in a second?
Wouldn't you want your "seconds" variable to increase by 1 each second?


59 seconds is equivalent to 59 seconds in game time.
The game is supposed to run at 60 frames per second (fps). 59 seconds * 60 frames / second = 3540 frames


An hour in game time is the same as an hour in real life --> 1 hour = 60 minutes = 3600 seconds


Here is a simple example of an evented timer Common Event:
View attachment 96056
That helps a lot! Thank you :)
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
[closed]IgnoreMe[/closed]
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top