This is the second method you can employ to create a more in-depth time system. Instead of relying on the time of day, instead this one will allow you to set up the progression of hours through the day, allowing you to create a variety of additional features for your game that require your player to be at a certain place at a certain time. Kind of similar to the later Pokemon games except this will not implement the internal clock on your Bios as that seems a little excessive...
Step 1: Set up your variable. This is done with a simple common event. I've named mine 'Time Set' and I need to know a single piece of information before going ahead with any more. What time is my game going to start? I've decided that I want my game to begin at 10:00am so I have set my variable to 10. The system I'm utilising will use a 24 hour clock (00:00 to 23:00) so if you're not too familiar on them you might want to read up a little.
As you can see, this event runs on a 'Parallel' Trigger and the 'Time Start' switch from my previous tutorial will initialise it. I've erased the event afterwards as it will not longer be useful and I'm a bit of a freak for keeping this kind of thing clean and organised.
Step 2: WARNING! This stage can be very repetitive so have a coffee ready to keep you going through this bit. We're going to create a series of 23 events that essentially do the exact same thing, simply looking for a specific variable value and setting a timer to count down until the next change of hour.
How does it work? By setting and manipulating a variable, we are able to use this number as an indication of the hour of the day. This is extremely handy because running 23 common events at once can be a tall order for an older computer system, utilising a streamlined approach like variables will speed up your game and give you some great experience in using variables.
No comments:
Post a Comment