Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Help with a Day/Night system using events

Im trying to implement a day/night system for my game strictly using events, but Ive hit a snag. What I had planned to do was sprinkle events all over the place in my game and have them activated by Player Touch. This would then add 1 to a Variable Im calling Time of Day. Each of these events would have a separate page for every time of day and on each page is an event changing the color of the map to correspond to the time of day.

Each page is supposed to be triggered when the variable is at or above a certain value. The problem is when my first Time of Day page is activated none of the other pages will activate, so I wind up stuck in perpetual dawn. Sadly Im as inept with variables as I am with scripting (I dont even have a clue how to do something as simple and basic as a coin toss as I dont know how to use variable so create a random outcome :s).

After I get this part hammered out Id like to make it so that there is only a slight possibility that the activated event will add 1 to the Time of Day variable, but I'll have to figure out how to use variables to select a random number (if this is even possible)

Any help you guys could offer this humble variable/scripting noob would be greatly appreciated and of course credit will be given. Im using the default system by the way. And if this cant be done without scripts :): shudder ::) then let me know and Ill request this to be moved. Thanks.

darkace77450
 
Well, sounds cool. But if you randomly put them on your maps, some people who never walk over that tiles, will always be at the same time. I geuss its just better to take a simple day/night script, reason above 2 lines above.
 
Mr_Smit;267436 said:
Well, sounds cool. But if you randomly put them on your maps, some people who never walk over that tiles, will always be at the same time. I geuss its just better to take a simple day/night script, reason above 2 lines above.

If I knew what I was doing with scripts I would much rather go that route. Alas, Im not better at scripting than I am at astrophysics or microbioloy. I looked at Trickster's Day/Night system, which works great. If I had a clue how to modify it to have the seven distinct times of day as opposed to the standard day/night I would use it in a heartbeat.

darkace77450
 
Darkace,

I made a day/night system for myself, which simply adds 1 to a variable every so many frames, running as a parallel process (along with days, weeks, months, seasons, random weather, various other things--so it most likely wouldn't run too smoothly on a slower computer).

But anyway, I find it works rather well.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top