Add seconds to the timer

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Normally when the timer is used to set a limit to how long the player has to complete something, it starts at the given length and counts down to zero, at which point the player has run out of time.

However, what I would like to be able to do is to provide something which will extend the length of time available by adding X number seconds back on to the timer. So, for example, the player hits a switch which adds 20 seconds on to the time still available.

How would I go about doing that?

Thanks.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
That does indeed look like exactly what's needed.
Thank you very much.
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
219
First Language
English
Primarily Uses
RMVXA
Can also be done with a script call.
Code:
$game_timer.start($game_timer.sec * 60 + 1200)
You'll need to convert seconds to frames by multiplying by 60. The above adds 20 seconds to the timer.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Rinobi Even nicer, as it means I don't have to have a whole script just for one function (though I'll keep that script in mind for another project.)
Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

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'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top