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.

So, I came across a dilema with my evented weather cycle.

So, I manage to get the main parts, transitions when enteirng house/cave (weather turns off when doing that), but when they exit a house/cave, the waittime cycle resets to the beginning, possibly allowing the player to cheat. To simplify this, I have a common event that has around 10 Wait 999, Wait 1, Wait 200, then it does a variable with random numbers, and the weather changes with that number. For example, variable=20 now? Snow. It's triggered by a switch and called constantly through a parralarel process event on every map except where it's disabled (i.e, special areas, houses, caves) and gets turned on again when they exit that area. Problem is when they do exit...the wait cycle resets to the beginning. I don't want that!
 
And you say the wait is on a common event?

The way I'd do it is use a variable that counts the "ticks", each time the wait cycle is completed, add 1 to the tick, if the tick is at your desired maximum, set it to 0.

Then you could use that variable as opposed to a bunch of waits.
Eg: Common event -

Wait 10
Ticks = Ticks + 1
If Ticks = 1000
-Ticks = 0
End

Weather paralel process -
If Ticks < 50
-Weather = Snow
Else
-If Ticks < 150
--Weather = Sun
-Else
--If Ticks < 450
---Weather = Raining Cats & Dogs
--Else
---If Ticks >= 450
----Weather = Windy
---End
--End
-End
End

Of course, use your random numbers to make the weather more predictable, this system would actually be used for a day/night cycle.
 
Well with my weather event system, it simplifies easily.

it has the actual config settings, and then the effects which are separate.

the effects are triggered by one switch "Weather Effects".

-- this works with my MAPsettings system, so every map has a parallel process. when inside -- or on a map that weather can not be shown, turn the switch off, and when on a map with weather shows, turn on.
very simple =]

so in basics, it works similar to yours, except my effects are connected separately, and follows along with the config.
Hope this helps

-Zen
 
Wait commands aren't carried over from map to map, therefore, you have to use something else. What you could do is the generic @wait_timer variable trick that's commonly used in custom battle systems and basically checks if the timer is bigger than one, and if so, does nothing - only when it's at 1, it'll trigger an action and re-set the timer (something like Xilef did, but more efficient). Fortunately, you can use $game_variables for that, so you don't have to use RGSS at all to maximize inefficiency (okay, that was obvious sarcasm... but you should really consider scripting some of the components - especially if you're using pictures or something for the weather sprites...)
 

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