Real-Time Time... time... time

Non-platform specific questions.

Real-Time Time... time... time

Postby BlenderFreak » Wed Oct 13, 2010 8:39 pm

NightmareHour.png
NightmareHour.png (5.3 KiB) Viewed 979 times


Time is a weird word if you think about it.
Anywho...
I know I've been asking loads and loads of question, but the problem is that I have all these ideas for what I want to do and I've got the graphics to do it, I'm just a beginner at scripting (and I've only be using GE for a month or so).
For the game I'm making, I'd to allow time to pass in real-time. I've got a sequence of images here for the right half of the town (these are NOT final. They look like crap and I haven't done any real texturing). I'd like to set it so that there's a clock in the right hand corner of the screen that passes just like normal time does - though faster, but still with a delay. Basically, I'd like there to be two minutes in an hour. So every "minute" in game time would be equal to two seconds. Once I have a code for this, I can do all sorts of other things that I want to do on my own (ex. "ifTime=12:00" the animation for the backdrop will play a 20 frame animation for the backdrop going from early morning to midafternoon, then remain there).
There is a slight twist though... in the story, when time reaches exactly midnight, everyone in the village turns to stone except for your character. This only lasts an hour, but when this happens I want the timer to destroy itself and be replaced by the special "Nightmare Hour" image (see above).
If anyone knows how to create a timer that will pass like this (including changing from 1:59pm to 2:00 pm, and from 11:59am to 12:00pm, etc), PLEASE let me know how to do so or at least provide a demo that I can learn from. This is going to play a big part in my game.
I've got millions of other questions, but I'm wanting to take this one step at a time. ;)
Can't guarantee I'll be able to test out any suggestions... I've already got a lot of other information I'm backed up on, and I've been really busy lately. I'm just getting information to prepare myself for when I've got the time to implement it. Thanks, everyone!

P.S. as for the Nightmare Hour... there won't be a visual of time itself passing in the game, but after the one hour delay is over, I want the Nightmare Hour actor gone and the timer created at 12:01am so that it will proceed as normal. Then when it reaches 11:59pm again and the 30 seconds are up, the Nightmare Hour repeats, and so on and so forth.
There's not much there yet, but you can find information on my current projects here.

https://sites.google.com/site/darkst3am/
User avatar
BlenderFreak
 
Posts: 55
Joined: Sun Sep 26, 2010 5:46 am
Location: His Computer
Score: 2 Give a positive score

Re: Real-Time Time... time... time

Postby TSO » Thu Oct 14, 2010 12:10 am

attached a quick clock file you can look at to learn.

Or you just asking for finished product?
I'll upload one in a minute.
Attachments
time.ged.zip
(105.36 KiB) Downloaded 66 times
TSO
 
Posts: 87
Joined: Thu Sep 02, 2010 5:53 pm
Score: 4 Give a positive score

Re: Real-Time Time... time... time

Postby TSO » Thu Oct 14, 2010 12:47 am

Here a clock with am pm included.
counts at about 2 seconds a 'minute'

Up to you to destroy or cover the clock with a high z index image? until the correct time lowers it again I guess.

Good luck have fun =)
Attachments
data.zip
(100.98 KiB) Downloaded 47 times
TSO
 
Posts: 87
Joined: Thu Sep 02, 2010 5:53 pm
Score: 4 Give a positive score

Re: Real-Time Time... time... time

Postby BlenderFreak » Thu Oct 14, 2010 3:45 am

Wow this is *exactly* what I wanted! Thanks a million!
Though I do have to know, it *does* have a 13th hour for PM or do I need to go in and fix that manually (which wouldn't be too hard for me to do, I just need to know if that works rather than sit here and wait on the clock! ;) )? But it seems to work great! Looks pretty good, too. Thanks a million!
There's not much there yet, but you can find information on my current projects here.

https://sites.google.com/site/darkst3am/
User avatar
BlenderFreak
 
Posts: 55
Joined: Sun Sep 26, 2010 5:46 am
Location: His Computer
Score: 2 Give a positive score

Re: Real-Time Time... time... time

Postby TSO » Thu Oct 14, 2010 3:56 am

just set the clock 12:58 and see??
Works fine for me.
If I set it before 13 the clock would cut out all the time of 12:01, 12:02, 12:03... so yea.... I had it count to 13 before resetting hour.
TSO
 
Posts: 87
Joined: Thu Sep 02, 2010 5:53 pm
Score: 4 Give a positive score

Re: Real-Time Time... time... time

Postby BlenderFreak » Thu Oct 14, 2010 1:07 pm

haha I'm honestly not sure how to do that.. :P
When I tried to, it was more of an "ultimate" = to. As in minute is always equal to 12, and second is always equal to 58. How do I set the clock so that it will still proceed from the time at which I set it? :P haha sorry - I'm not much of a script-writer. Plus I come from a Python background, and it seems considerably different from this scripting language (though I have to admit that GE's language seems considerably easier).
There's not much there yet, but you can find information on my current projects here.

https://sites.google.com/site/darkst3am/
User avatar
BlenderFreak
 
Posts: 55
Joined: Sun Sep 26, 2010 5:46 am
Location: His Computer
Score: 2 Give a positive score

Re: Real-Time Time... time... time

Postby TSO » Thu Oct 14, 2010 4:33 pm

any actor
event add -> create actor -> script editor: minutes=58; seconds=58;
When the actor is created it will set those variables. it only gets created once so should allow it to change.
draw actor is while the actor exists. so basically constantly. I use that to keep track of the current count on time.
TSO
 
Posts: 87
Joined: Thu Sep 02, 2010 5:53 pm
Score: 4 Give a positive score

Re: Real-Time Time... time... time

Postby BlenderFreak » Thu Oct 14, 2010 9:23 pm

ahh alright, that makes sense - thanks again!
There's not much there yet, but you can find information on my current projects here.

https://sites.google.com/site/darkst3am/
User avatar
BlenderFreak
 
Posts: 55
Joined: Sun Sep 26, 2010 5:46 am
Location: His Computer
Score: 2 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron