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.

Zeriab's SecureWait System

I noticed Zeriab had made a SecureWait System (a parralarel common event timer that could be user over maps), and I was wondering how would I work it into a day/night system?
http://img132.imageshack.us/img132/9901 ... system.png
For help, This was orginally the default way I was going to do it:

Code:
<Loop>

@Set Variable: [001: Time] +1

@Play Se:'Cockadoodle-Doo', 80, 100

@Change Screen Color Tone (-50,-50,-50,0), @0

@Wait 500 Frames

@Wait 500 Frames

@Wait 500 Frames

@Set Variable: [001: Time] +1

@Change Screen Color Tone (-30,-30,-30,0), @0

@Wait 500 Frames

@Wait 500 Frames

@Wait 500 Frames

@Set Variable: [001: Time] +1

@Change Screen Color Tone (-15,-15,-15,0), @0

@Wait 500 Frames

@Wait 500 Frames

@Wait 500 Frames

@Set Variable: [001: Time] +1

@Play Se:'Meow', 80, 100

@Change Screen Color Tone (50,50,50,0), @0

@Wait 500 Frames

@Wait 500 Frames

@Wait 500 Frames

@Set Variable: [001: Time] +1

@Change Screen Color Tone (-85,-85,-85,0), @0

@Wait 500 Frames

@Wait 500 Frames

@Wait 500 Frames

@Set Variable: [001: Time] +1

@Play Se:'Hoothoot', 80, 100

@Change Screen Color Tone (-125,-125,-125,0), @0

@Wait 500 Frames

@Wait 500 Frames

@Wait 500 Frames

@Set Variable: [001: Time] =0

<Loop>

Details for Common Event: Trigger is Parralarel, Switch is 001: System Activate, and I meant it for it to have six parts of a cycle: Dawn, Morning, Noon, Afternoon, Evening, and Night. The reason why I was posting this thread is because I encounter problems with my DNS WIP.
 
You don't need a "Loop" command, because a Parallel Process automatically does that. Now, what kind of problems do you run into?

Here's a different method you can try that could potentially avoid problems:

Code:
 

@>Conditional Branch: Variable [001: Time] == 0

  @>Play SE: 'Cockadoodle-Doo', 80, 100

  @>Change Screen Color Tone (-50,-50,-50,0), @0

 

@>Conditional Branch: Variable [001: Time] == 1

  @>Change Screen Color Tone (-30,-30,-30,0), @0

 

...continue adding Conditional Branches and altering the screen tint or playing SEs as needed, up to 5.

 

@>Wait: 500 frames

@>Wait: 500 frames

@>Wait: 500 frames

 

@>Conditional Branch: Variable [001: Time] == 5

  @>Control Variables: [001: Time] = 0

 : Else

  @>Control Variables: [001: Time] += 1
 
I think I only have one, it doesn't seem to run at all...it's pretty much stuck on Dawn, though when I do a mimized version via an event, it pretty much works fine. I also have conditional branches and tricks set up, like different animals and monsters during the day, shops closing at night, and solar/lunar power weapons/armor, even a spell that returning to the Morning segment.

Though the thing I'm mostly worried about is the system resetting every time I leave/enter a map.
 
Ah, that might be the issue- leaving the map before 1500 frames are up, and causing the event to restart at Dawn and wait another 1500 frames.

Instead of so many Wait frames, you can try something like this:

Code:
 

@>Wait: 5 frames

@>Control Variables: [002: Frames] += 1

@>Conditional Branch: Variable: [002: Frames] == 300

   @>Conditional Branch: Variable [001: Time] == 5

     @>Control Variables: [001: Time] = 0

    : Else

     @>Control Variables: [001: Time] += 1

    : End

   @>Control Variables: Variable [002: Frames] = 0

 : End

 

The "Frames" variable works just like the "SecureWaitCounter" in Zeriab's system. It's basically a timer that's added to every 5 frames (although you can edit the value as necessary, just edit the final value in the Conditional Branch as well).
 
In the same common event, in place of the "Wait: 500 frames" commands. If you're using my version of the code (my first post), paste it on line 10 and delete everything after.
 

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