Advancing, or speeding up timer question

FateStCloud

Villager
Member
Joined
Feb 8, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Heya everyone,

I was just wondering if there was a built in way to advance a current on going timer? for instance:

1.Timer starts, 30 mins counting down
2. Player goes to sleep/stays at an inn.
3. Timer advances by x amount of time.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
The Control Timer command doesn't allow you to use variables, so you'd have to do a Script call to set it. In that case, while you could use Control Variables to GET the current time remaining into a variable, I'd just skip it and use a script call to get, modify and restart the timer.

Something like this:

Code:
new_time = $game_timer.sec - 1800$game_timer.start(new_time * Graphics.frame_rate)
or condense it into a single line:
Code:
$game_timer.start(($game_timer.sec - 1800) * Graphics.frame_rate)
If you have the editor that only has a small script call window, do it like this:
Code:
$game_timer.start(($game_timer.sec - 1800) * Graphics.frame_rate)
otherwise it'll break in the wrong place and cause your game to crash.
 
Last edited by a moderator:

FateStCloud

Villager
Member
Joined
Feb 8, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
The Control Timer command doesn't allow you to use variables, so you'd have to do a Script call to set it. In that case, while you could use Control Variables to GET the current time remaining into a variable, I'd just skip it and use a script call to get, modify and restart the timer.

Something like this:

new_time = $game_timer.sec - 1800$game_timer.start(new_time * Graphics.frame_rate)or condense it into a single line:
Code:
$game_timer.start(($game_timer.sec - 1800) * Graphics.frame_rate)
If you have the editor that only has a small script call window, do it like this:
Code:
$game_timer.start(($game_timer.sec - 1800) * Graphics.frame_rate)
otherwise it'll break in the wrong place and cause your game to crash.
I will have to try that, thanks for the info, sorry about not getting back sooner, email never said anyone posted this time.
 

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

Latest Threads

Latest Posts

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,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top