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.
[RPGXP] Real 24-hour clock system, how do I make this work?

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 87
Trainer Orange.
Hello. I was looking into this for quite some time now. I wanted to make a clock system in my game where it tells you the real time in 00:00 format. For example, lets say you click a clock in somebody's room. It would find the system time and display that in 00:00 format (for example, 8:33 pm). I'm assuming this might be a script. But either way. I was hoping to find a working system for this feature. I have looked all over the place (including google/youtube) and I haven't found one that works. Perhaps someone here has made it possible? One that works? It has been bugging me for quite some time now, and I never found a working one. Nor do I have the scripting knowledge to figure it out (I hope some time I have the knowledge in the future, at least).

~Neutral

**
Rep:
Level 82
You use this script call:

Code: [Select]
t = Time.now
s = "#{t.hour}:#{t.minute}"
$game_variables[ID] = s

Replace ID with whatever ID of a game variable you want to use for it.
You can then make a normal evented message with this:

"The current time is \v[ID]."

**
Rep:
Level 87
Trainer Orange.
Uhh, i'm having a problem with this code at the moment.

http://i176.photobucket.com/albums/w177/Neutral12/error.png

Every time I run the event when I click it, I get this error message. I included the coding for the event.

***
Rep:
Level 84
Yes, hoh my gawd!
Try time.min

**
Rep:
Level 82
Yeah, gg's right. I don't know why I wrote "minute", its "min".

**
Rep:
Level 87
Trainer Orange.
Thank you so much, this solved my issue with the clock. I appreciate it so much.

One more question though. I was also interested in adding day and night. Is it possible to make it so the game will check for a certian time on your system clock; then depending on that time, it will tint your screen darker for night. Then check your system clock for another time which makes it morning? How can I accomplish this?

**
Rep:
Level 82
You could use a Common event with a parallel trigger.

Use variations of this little snippet:
Code: [Select]
Time.now.hour == HOUR

Replace HOUR with an actual number, and use this as a conditional branch.
Then have a command set the screen tone accordingly.

That's your most basic way of doing it. There are multiple time system scripts around, though they are usually a little more in-depth than just doing what you asked.