Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Timer Script
mstr448
post Jan 2 2010, 07:47 PM
Post #1


Level 5
Group Icon

Group: Member
Posts: 61
Type: Scripter
RM Skill: Advanced




Things required:

An object that has a create event with a code that says this:
CODE
second = 0
minute = 4
timer = 0

the minute = 4: this can be replaced with how many minutes you want
the timer to count down
Now, make a step event, and put this in code:
CODE
timer+=1

if timer = 30
{
    timer=0
    second-=1
}
if second = -1
{
    second=59
    minute-=1
}

Now, draw it with draw commands and there you go!

To make something happen when the timer reaches zero, put this in step in a NEW code:
CODE
if minute = 0 and second = 0
{
    room_restart()
}

The room restart can be replaced with whatever you want to happen.

Here are some screenshots:
[Show/Hide] Screenshots



Demo of Timer


__________________________
My real internet name is TheRPGLPer, not MSTR448. I am too lazy to make a new account.
Request a Game Maker 7 or 8 script here!

Bio:
I am a RPG creator experienced with RPG MAKER VX and extreamly experienced with
Game Maker as I was able to make a SimCity game from scratch in Game Maker 7.0 Pro.
I'm advanced with scripting in Game Maker but suck at it with RPG MAKER VX.

-My Games-
Tower of Doom
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 24th May 2013 - 08:31 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker