Weather effects during an animation?

I'm trying to play a screen weather effect in the middle of an animation. I have the following function that I call from Sprite_Animation.prototype.processTimingData:

JavaScript:
    Sprite_Animation.prototype.createWeather = function(type, power, duration) {
        this._weather = new Weather();
        this._weather.type = type;
        this._weather.power = power;
        this._weatherDuration = duration;
        this.addChild(this._weather);
    };

It works, but there's one problem - it doesn't fill the whole screen. There's a band on the left and top that are unaffected. Weather effects played on the map (through events) fill the screen, so I must be missing something.

Here's a partial screenshot showing the issue, omitting anything that gives away details of my game (I just cut off the battle log, the status window, and the sideview actors):

1593366252635.png


I took it while paused in the debugger, so I think that may have greyed it out a little or something, but it should get the idea across.
My gut feeling on this is that your weather sprite is being created in a viewport that's smaller than the screen size. Let me have a play with this and see.

Whereabouts did you add the code that creates the weather effect?
Whereabouts did you add the code that creates the weather effect?
I have the following function that I call from Sprite_Animation.prototype.processTimingData:

It's created in processTimingData - conditionally mind you, only if the timing has a scope of 1 and a flash intensity (flashColor[3]) of 0.
What's the "Position" setting for the animation that creates it?
It's set to "Screen"... which makes me wonder what would happen if it wasn't, as I hadn't considered that option.

EDIT: Changing the Position setting does move it around, but none of the four possible settings make it fill the screen.

EDIT2: I was browsing HimeWorks plugins for an unrelated reason and spotted one that enables weather during battle, maybe that'll give a clue what I'm doing wrong. (The plugin is a little different from what I'm doing, it just makes the event command work in battle.)
Have a play with that and see how you get on. If you still can't puzzle it out let me know and I'll see if I can help further.
My gut feeling on this is that your weather sprite is being created in a viewport that's smaller than the screen size. Let me have a play with this and see.
I think in some sense this is on the right track. Playing the animation on the map has the same problem, but if I add the weather object to this.parent.parent.parent it works correctly. However, that means it's no longer confined to the animation, which means it outlives the animation and persists, so I probably still need a different solution... is everything within the animation sprite clipped to its bounds? If it is, probably the only option is to make the animation remove the weather from the battle spriteset when it's finished.
I believe the animation sprite has a defined viewport, yeah. That might have to be how you do it.

Original thread: https://forums.rpgmakerweb.com/threads/weather-effects-during-an-animation.123392/