Main Menu
  • Welcome to The RPG Maker Resource Kit.

Making a box that displays time remaining

Started by ChoedanKal, October 27, 2009, 05:00:18 AM

0 Members and 1 Guest are viewing this topic.

ChoedanKal

Hi guys.

I'm intending to create an quest where a player has 30s to get from one point to another.
What I'm looking for is a method of showing how much time is left.
I'm thinking of a box on the top right corner (above my map) that countdowns.

So it should display 30 at first and keep decreasing by 1 every second till 0.

Anyone knows how to do this?
Help would be much appreciated.

modern algebra

In the event you want to create the timer, make a new event command. On the first page of event commands, in the first column and seventh row there's a SECRET command called "Control Timer". Click it and put in the amount of time you want. You can then make a parallel process and use a conditional branch (first event page, 1st column, 8th row) on Timer (the first page of the conditional branch options, last one down). You can use that to control what events happen at what tile left in the timer.

ChoedanKal

Oh sorry, I think I'm not very clear.
What i need is an pop up window that shows how much time is left.
So the window should hopefully float in the top right corner of the screen, showing 30,29,28,27,26,25,..... The number in the window reflects how much time is left.


I think i know how to set what happens after the 30s (using wait or the control timer as mentioned above). I've thought of using a message box to show the time. But when the message box appears, the player cannot move, sorta defeating the purpose of setting time. :)

ChoedanKal

OH!
Terribly sorry  ;D

I was always thinking of control timer as well a timer that doesn't show anything!
That is exactly what i need!

edit: How do I + rep to you all? Can't seem to find the button

modern algebra

#4
You have to have like 75 posts or something before you can modify rep. On this forum though, rep means absolutely nothing due to years of abuse and apathy, so it's completely irrelevant. Don't worry about it - we're happy to help.

Lazer Ki

Yeah, the sometimes  RMVX Event Command names can be confusing.  :lol:
Hi

ChoedanKal

Got a few more questions, related to the question, but i figured that I might as well ask them here instead of starting so many threads.

Well, basically the only language that I know how to program in is C. (Well very basic level or programming though). So if the questions that I ask looks very C'ish well we know why :)

1. Is there a way to declare global variables?
Currently what I'm doing is to create a common event to declare all global variables and to initialize some constants too.

2. Is there a way to use variables in a call common event?
What I'm intend to do is something like this. If variable == 1, start event 1, variable == 2 start event 2 and so on.
I know I can use conditional branches to create this, but its going to be very long. (Is there a switch(){ } command like C? :) )

3. Function calls?
The only thing that I can find is call common events. Well, i can make it work but is there a way to pass a value directly into the other event?
What I'm doing now is to put the value to be passed into one of those variables that I've declared in my first common event page. Same thing for return values.

4. I've created a few states in the database manager.
But when I decide to inflict them on the player, they do not appear in the status page of the menu?

Well, that's all for now guys :) I'm pretty new to rpgmaker and could do with these to help me start.

modern algebra

1. I assume you're talking specifically about eventing right now. Basically, all variables are global. You can access them with the Control Variables command. They only hold integers when accessed through event commands.  You can set them to other things with script calls, but for now I will assume integers are sufficient for our purposes. You can use switches as global booleans.

2. Easy to use variables. In the Conditional Branch command we showed you earlier, you can also set conditions based on the value of a variable.

3. In effect, common events are the only default ways to have functions. They do not return values though. However, since variables and switches are global, if you want something returned that is an integer or a boolean, you can set it in the common event (Also, there are other ways to approximate function calls, but that is the most direct).

4. Check the release conditions on the states. If it's at "End of Battle", then the state will not apply outside of battle.

ChoedanKal

OK thanks again!

More or less have started things rolling :)

I really appreciate your help guys!