00due / RMMZ-ScreenTransform

Screen transform plugin for RPG Maker MZ. Rotate / skew etc.
MIT License
0 stars 0 forks source link

Uncaught TypeError: Cannot set property 'rotation' of null #2

Open donaldderrick opened 1 week ago

donaldderrick commented 1 week ago

In the middle of a rotation, escaping to menus ALWAYS, and leaving the map INTERMITTANTLY causes the crash error:

Uncaught TypeError: Cannot set property 'rotation' of null.

The intermittent errors are more common in full screen, but escaping to the menu is 100% fatal.

I use a mac, and am running the game in-engine.

I can confirm the bug occurs even with an empty game - so there are no plugins that are interfering with your plugin.

donaldderrick commented 1 week ago

Note that I was able to resolve the menu crash by using the CTB_CustomScriptANnywhere_MZ plugin to call a pre-script common event before the SceneMap.prototype.callMenu command. The common event flips a switch to stop a common event I use to generate all my calls to your rotation plugin commands, waits 25 frames, and then calls your screen transform reset plugin command. All 3 are needed to resolve the menu crash. I then use CTB_CustomScriptAnywhere_MZ's post-script to call a common event that turns my desired transforms (in this case rotations and shakes) back on. For the easier task of transferring the player to new maps, I simply turn off the switch to the rotation calling common event, call your screen transform reset plugin, and use a door animation to give rpg maker enough time to finish operations before I transfer maps.

00due commented 1 week ago

That's definitely a problem that comes from changing the current scene. I'll update this plugin later to check if the same scene is still usable when transforming.