RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Making a box that displays time remaining

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 82
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.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
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.

**
Rep: +0/-0Level 82
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. :)

**
Rep: +0/-0Level 82
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

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
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.
« Last Edit: October 27, 2009, 09:02:17 PM by Owyn »

****
kikiki
Rep:
Level 84
Hi
Yeah, the sometimes  RMVX Event Command names can be confusing.  :lol:
Hi

**
Rep: +0/-0Level 82
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.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
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.

**
Rep: +0/-0Level 82
OK thanks again!

More or less have started things rolling :)

I really appreciate your help guys!