Or a look-up table.
> var list/days = list(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
>
> proc/CheckMonthCount()
> return days[currMONTH]
>
Even better (:
In response to LordAndrew
|
|
LordAndrew wrote:
Or a look-up table. > var list/days = list(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) Even better (: |
In response to FIREking
|
|
FIREking wrote:
You're all making this harder than it is, you can just scale time. If you want time to be slower, you would just take current time and multiply it by a decimal point... if you wanted time to be twice as long as real time, it would be realtime * 2 your code here This is just one way to do it, you could also base it off of world.timeofday (resets every 24 hours) or world.realtime (only has minute precision, not seconds precision). I did it your way, making changes to get it to the 7.2 scale I wanted(not really hard, I changed wording a bit as well), but after doing so, it works! Until it gets to 0:5(hour:minute), it resets to 0:0 for some reason. Also, I tried world.timeofday, but it gave a huge number, I want the 'clock' to stick to a 12/24-hour design(from 1-12 then back to 1 or 0-23 then back to 0) how do I set that up? do I just need an if() statement that changes world.time(if that even works)? |
In response to JS173
|
|
Try changing your h:m to hh:mm.
|
the code used doesn't use H:M it uses 2 procedures[I changed them to TimeH()/TimeM()]
so the code for time is: mob/Stat() which is gotten by: proc/TimeUp() Which is gotten by the procedures TimeH() and TimeM() set in this way: proc/GameTime() so, in conclusion, I'm not sure how to set the code to hh:mm in this situation, as this would make it "[TimeH][TimeH]:[TimeM][TimeM]" which would not work very well. |
In response to JS173
|
|
after Full Time add a )
|
world I used what was given before, just changed the wording, mostly. |
probably...that would explain things(probably) since it only makes it to 5, then resets on 6. I'll make the change and see what happens, thanks.
EDIT: Well, it makes it over 5, but it now starts at 8 and increases in intervals of 8, would lowering the time between the clock's update cause problems? say, if I lower how long it takes between, will it slow the game's speed/increase lag for players 'cause it's updating so often? |
that's actually a really good idea too.
i think i will.