My Weather System keeps bugging.

AirshipCanon

Veteran
Veteran
Joined
Oct 27, 2015
Messages
54
Reaction score
10
First Language
English
Ok, this is a weird problem and it's part of weather system I concocted. (No, no Plugins with this-- I'll eat my hat before using a plugin to do what these events are.)

The Bug: Sometimes, not all the time, when I have my hero enter a building, the weather effects don't stop, but they should.
My theory: A. I'm doing something wrong. B. Lag.

The Events:

Common Event 1: Weather Core
Type- Parallel
Switch-- Weather Switch

(some comments are ##### as they're very much notes for myself, and contain information regarding my game's world)

 'Comment: Controls the System'Comment: -----------'Comment: Skips if NecessaryIf [Switch:Do Not Randomize] is OnJump to Label: End. end BranchIf [Switch:Controlled] is OnJump to Label: Endend BranchIf [Switch:preset] is OnJump to Label: Endend BranchIf [Switch:Instant Randomizer] is OnJump to Label: Randomizerend BranchIf [Switch: Wait Doesn't Stop] is OnJump to Label: Do Not Resetend Branch'Comment: Reset Duration on Load and at new cycle. Variable [Duration Randomizer] = Random 60...180Variable [Duration Counter] = 0'Comment: Waits for Random DurationLabel: Do Not ResetIf [Switch: Wait Doesn't Stop] is OnSwitch: [Wait Doesn't Stop] = Offend BranchLoopIf [Variable: Duration Counter] >= [Variable: Duration Randomizer]Break LoopElseWait 100 FramesVariable: [Duration Counter] +1end Branchend Loop'Comment: Sets EffectsLabel: RandomizerSwitch: [Instant Randomizer] = Off'Comment: Sets Effect Based on Location Variable, and randomize it based on %s.If [Variable: Location Variable = 1]'Comment: ########Variable: [Effect Randomizer] = Random 1 ... 100If [Variable: Effect Randomizer] >= 96'Comment: #######Variable: [Effect] = 6Jump to Label: End. end BranchIf [Variable: Effect Randomizer] >= 86'Comment: #######Variable: [Effect] = 5Jump to Label: End. end BranchIf [Variable: Effect Randomizer] >= 76'Comment: #######Variable: [Effect] = 3Jump to Label: End. end BranchIf [Variable: Effect Randomizer] >= 51'Comment: #######Variable: [Effect] = 1Jump to Label: End. end BranchIf [Variable: Effect Randomizer] <= 50 'Comment: #######Variable: [Effect] = 4Jump to Label: End. end Branchend Branch [##-- This repeats a few times with different Randomizer values and Effect values]Label: End. If [Switch: Preset] is OnSwitch: [Preset] = Offend BranchIf [Switch: Outside] is OnCommon Event: Weather Effectsend BranchCommon Event 2: Weather Effects
Type- Parallel
Switch-- Outside
(Since this code is all repetitive I'm just using 3 examples, but it's really just what effects are and how to apply them.)
 

If [Variable: Effect] = 1 Switch: [Thunderstorm] = OffTint Screen: 0,0,0,0 210 FramesSet Weather Effect: None, 210 FramesFade Out BGS: 3 secondsend Branch...If [Variable: Effect] = 4Switch: [Thunderstorm] = OffTint Screen: -25, -25, -25, 60 210 FramesSet Weather Effect: Rain, 7, 210 FramesWait: 21 FramesPlay BGS: Rain 3 (70, 100, 0) end Branch...If [Variable: Effect] = 6Tint Screen: -25, -25, -25, 60 210 FramesSet Weather Effect: Storm, 8, 210 FramesWait: 21 FramesPlay BGS: Storm 2 (85, 90, 0)Wait: 189 FramesSwitch: [Thunderstorm] = Onend BranchCommon Event 3: Thunderbolts!
Type- Parallel
Switch-- Thunderstorm

 

Loop [#I Don't know why I have this loop, but for some backwards reason it never wanted to agree with me with out it.]Variable: [Thunderbolt Randomizer] = Random 15...720Variable: [Thunderbolt Looper] = 0LoopIf [Variable: Thunderbolt Looper] >= [Thunderbolt Randomizer]Play SE: Thunder 9 (100, 80, 0)Flash Screen: (187, 187, 255, 225) 32 Frames (Wait)Break LoopElseWait 1 FrameVariable: [Thunderbolt Looper] +1end Branchend Loopend Loop Common Event 4: Weather Cancel [i think this maybe screwing up, maybe?]
Type- Called Only/None
 

Switch: [Thunderstorm] = OffSwitch: [Outside] = OffTint Screen: (0,0,0,0) 1 Frames (Wait)Set Weather Effect: None 1 FramesFade Out BGS: 1 SecondSwitch: [Wait doesn't Stop] = OnCommon Event 5: Weather Restore
Type- Called Only
 

Switch: [Outside] = On(**See "Weather Effects" Event, but all timings are minimized: 1 Frame for Tint/Effect, BGS in 1s, no Waits)
That's the series of Common Events.
I have all of my Doors and entrances to caves/dungeons etc, set to call the "Weather Cancel" Event
 
Code:
Fadeout ScreenCommon Event: Weather CancelTransfer Player: --,--Wait 3 FramesFadein Screen
(And the Reverse for exits, etc-- using Weather Restore where Weather Cancel was.)

Now, by all means, this system WORKS (unlike the prototypical system I had in 2K3, which had more bugs than the neglected garbage can 4 weeks old down the street.)
Until, occasionally, I'll enter a building and boom, it's still raining.
If I enter/exit, it rights itself.
But if I just go on about my business in said building, the glitched effect will continue as though it was normal.

I can't figure out solving this one.
Is this just the game lagging and causing hang ups in my events?
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
Try adding a "Wait 1 Frame" between the Common Event and the Transfer Player.

Edit: Ah, actually, now that I've looked at the code, I see that the common event is executed immediately when used like that, so that was not the issue. Let me think what else could be causing this.

Can you check if the "Outside" switch is properly turned off when the rain effect continues while inside?
 
Last edited by a moderator:

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
Try adding a "Wait 1 Frame" between the Common Event and the Transfer Player.

Edit: Ah, actually, now that I've looked at the code, I see that the common event is executed immediately when used like that, so that was not the issue. Let me think what else could be causing this.

Can you check if the "Outside" switch is properly turned off when the rain effect continues while inside?
^this.

Certain commands even if put in the correct order, especially when involving a transfer event, is probally not proc, due to the instant effect of transferring the char. 

Wait command should force the weather cancel command to take effect 1st, but if for some reason it doesn't(It's a bug if the wait command doesn't work), you could always use a common event to control such, which frankly, you should be using a common event to control such anyway, as It's more efficient that way(if you are ever planning to use that weather effect more then once anyway).
 
Last edited by a moderator:

AirshipCanon

Veteran
Veteran
Joined
Oct 27, 2015
Messages
54
Reaction score
10
First Language
English
I added 1 frame wait commands after the event calls, and added a (semi-?)redundant "Switch: Outside = Off" to my Door Events [followed by a wait 1 frame].

I haven't seen the bug since.

So I'll consider this solved [for now].
(Can't believe I actually got the darn thing functioning. After the hours of headache on 2K3 trying to make it work, I give it a few in MV, and boom, it's basically totally functional.

Hmm... perhaps move to Tutorials so that others can use this? [it's just events so...]
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top