The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: cjk on May 07, 2007, 01:25:26 AM

Title: In-game time event?
Post by: cjk on May 07, 2007, 01:25:26 AM
is there a way to show the in-game time you have been playing in an event?
Title: Re: In-game time event?
Post by: Lackluster on May 07, 2007, 01:26:45 AM
You should've just continued with the old one >.> And what time system are you using? o_O
Title: Re: In-game time event?
Post by: cjk on May 07, 2007, 01:28:23 AM
what do you mean?
Title: Re: In-game time event?
Post by: Irock on May 07, 2007, 01:29:48 AM
I believe he means, you should have asked this in your old thread, instead of posting a new one.

I think you could possibly do this with a call script command, although I'm not 100% sure.
Title: Re: In-game time event?
Post by: cjk on May 07, 2007, 01:33:29 AM
I asked "what do you mean" for when he asked what time system i was using
Title: Re: In-game time event?
Post by: Irock on May 07, 2007, 01:34:42 AM
I assume he doesn't know what he's talking about.

Just ignore what he said <_<
Title: Re: In-game time event?
Post by: Lackluster on May 07, 2007, 01:35:13 AM
.................Learn some RPG Maker basics then come back please.
Title: Re: In-game time event?
Post by: Irock on May 07, 2007, 01:36:12 AM
Although I agree with you on that, he's just asking for help, it's always nice to help others in need.
Title: Re: In-game time event?
Post by: Falcon on May 07, 2007, 01:59:56 AM
Quote from: Lackluster on May 07, 2007, 01:35:13 AM
.................Learn some RPG Maker basics then come back please.

You need more than 50 posts or RMRK+ before you can flame RPG Maker n00bs. So shut up.
Title: Re: In-game time event?
Post by: Zeriab on May 08, 2007, 11:33:06 PM
Just paste this into a Call Script event command:
sec = Graphics.frame_count / Graphics.frame_rate
$game_variables[1] = sec

This will store the total playtime in seconds in variable 1. If you want to store it in another variables change the number in $game_variables[1].
Note that if you want to display it as hour/minutes/seconds you will have to split the time up with variable operations.
Title: Re: In-game time event?
Post by: Kokowam on May 09, 2007, 12:33:20 AM
Quote from: Zeriab on May 08, 2007, 11:33:06 PM
Note that if you want to display it as hour/minutes/seconds you will have to split the time up with variable operations.
To do that, you need to use the Mod feature that I do not want to go over because I'm too nub. A guy with a really long name made a tutorial on it. Mod will divide things and return the value without decimals (I think)
Title: Re: In-game time event?
Post by: Zeriab on May 09, 2007, 06:35:03 AM
To get seconds use mod 60
To get minutes use div 60 followed by mod 60
To get the rest as hours use div 3600