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.

A Simple DDNS[Resolved]

I'm looking for a good day and night system for my game, but most of the ones i'm finding are to complicated. All i want is something really basic. A time system consisting of morning, noon, and night periods. There doesn't even need to be a clock. It has to be seperated in switches though, because i want to make it so certain events will appear at cartain times, that otherwise wouldn't be there. (Ex: A shop is open in the day, but not at night). I really don't care if i could easily do this through events, or a script. Whatever would work best. I would use Blizzards DDNS, but i can't figure out how to get it to work. I already know that i have to set a script event to trigger it on autorun.

$game_ddns.turn_on
$game_ddns.go_outside
$game_ddns.make_it_day

But, how do i actually manipulate the time? When i tried that, it just stayed day the whole time and never changed. Do i actually have to set it to night time when i want it to, or does do it automatically?

Any help and recommendations are welcome.

Note: eharper256's system does not work. For some reason, it's not compatible with some other scripts, and does absolutly nothing. No script error...it's just does nothing.
 
I'm using Blizzard's DDNS, but you're right. It does seem to be giving me problems. I just turn it on initially and then set up common events to do the switch controls.

But, I can help you event a day and night system. You'll have to play around with screen tinting a lot, because I don't know the exact colors to use, but anyway...

Basically, set up a common event that starts a timer at however long you want a day to be. Set the trigger to 'none' and then just call this event whenever you want a new day to start (ie the beginning of the game and when the timer hits 0). Then, create a parallel common event that repeatedly sets a variable equal to the timer. All you have to do is put that command in there, and since it's parallel, it'll run over and over.

Now, in your parallel common event below setting the variable, you want some conditional branches that control your switches and tinting. None of them need 'Else' sections. For example:

Code:
@> Conditional Branch: Variable (001: Clock) == 50
   @> Control Switches: (001: Morning) == ON
   @> Control Switches: (003: NIght) == OFF
   @> Change Screen Color Tone: (some color)
:Branch End
@> Conditional Branch: Variable (001: Clock) == 35
   @> Control Switches: (002: Day) ==On
   @> Control Switches: (001: Morning) == OFF
   @> Change Screen Color Tone: (Normal tone probably)
:Branch End
@> Conditional Branch: Variable (001: Clock) == 15
   @> Control Switches: (002: Day) == OFF
   @> Control Switches: (003: Night) == ON
   @> Change Screen Color Tone: (blue or something)
:Branch End

And that should work. Let me know if you need any more features to it; that's very simple.
 

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