Charas-Project

Game Creation => Requests => Tutorials => Topic started by: lonewolf on May 08, 2008, 11:15:31 PM

Title: am/pm and day and night
Post by: lonewolf on May 08, 2008, 11:15:31 PM
am/pm and day and night
here is what im looking for lets say it's day time am
but you go to sleep at a inn  when you get up its pm night time
when you go out the inn its dark and the moons out
 then when you go back in to the  inn to sleep
it am day time  you go out of the inn it light out side and the suns out
is there any way to do this step by step if any one can help on this
i give thanks in my game and a link to the game by pm only
as i lkie to give a copy of the to all the helps 1st then i think of posting up the link  as im do a lot off work to this game

i got a time pass swith on the map so far  i need the day and night to work a long side it
thanks for your time and help
Title:
Post by: Koshi on May 19, 2008, 12:15:36 AM
It's very easy if you do it with attention:

1 - You must have a system that determinates what's the hour (you can find it here).
2 - When you hero goes sleep, simple add 12 to this system above.

If you can't find the system:

1 - Create a new event on common events and set it paralel process ativate by none switch.
2 - Name it Time and at commands place this:
 
- Add 1 to variable TIME.
- Wait 3600 (sixty minutes, one hour). - Make a lot of wait to get this quanty.
- Fork conditional - If TIME is equal or above 0
Change screen tone (collor) to darkness one
- Fork conditional - If TIME is equal or above 8
Change screen tone (color) to morning one.
- Fork conditional - If TIME is equal or above 16
Change screen tone (collor) to afternoon one.
- Fork conditional - If TIME is equal or above 24
Subtract 24 of variable TIME

I hope it's work, I didn't test!
Title:
Post by: Rayonius on May 19, 2008, 01:54:57 AM
In video games, you usually want short days, approximately 1 minutes to 10 minutes
Title:
Post by: Koshi on May 19, 2008, 05:57:33 PM
He can change the wait time.
Title:
Post by: Ben on May 19, 2008, 06:34:56 PM
I have found that using 12 hours as a sleep time is silly in systems like this one.

Sleep for 4-8 hours at a time.

OR.... if the time of day is a large factor in your on-map events...
Try giving the player the option to have a nap (2-4 hours) Or a long sleep (7-10 hours)

I know there is a tutorial somewhere on charas for making this system.... Some screen tinting, and a few eventsw to Illuminate windows and light posts at night will add a nice touch

Events that only happen at night are sweet.

Good luck soldier
Title:
Post by: Fisherson on May 19, 2008, 06:51:03 PM
I can't make a working night and day system myself...
Title:
Post by: lonewolf on May 19, 2008, 08:21:06 PM
thank for all the help it given me lot to think on
Title: Re: am/pm and day and night
Post by: RadiantWind on November 16, 2008, 04:24:50 AM
Koshi, it looks good, but I think that a loop should be put beneath the wait part
Title: Re: am/pm and day and night
Post by: Desimodontidae on November 16, 2008, 04:46:05 AM
Try giving the player the option to have a nap (2-4 hours) Or a long sleep (7-10 hours)

Reminds me of Oblivion...
Title: Re: am/pm and day and night
Post by: fruckert on November 16, 2008, 04:48:10 AM
Kinda
Although with any of the Elder Scrolls you sleep in increments of hours, up to a day
Now I want to know how to do this in Game Maker, without it restarting the time every time I leave the room
Title: Re: am/pm and day and night
Post by: Prpl_Mage on November 16, 2008, 09:08:03 AM
Make it a parallel event.