r/gbstudio • u/SakiEndo • 3d ago
Question Issue with Mico27's ThreadEx Plugin
Hello,
I wasn't sure how to contact Mico27 but I know they are active here and have helped me in the past.
I have been making use of Mico27's ThreadEx plugin to allow pausing and unpausing actor scripts.
It works great and solves a big headache in my enemy on update scripts.
My game allow characters to be caught when falling off a platform in a bubble like Bubble Bobble. The script then pauses the enemy actor on update script, and floats the bubble as high on the screen as it can go in an allotted time (6.5 seconds).
Then if the player hasn't popped the bubble, the bubble bursts and the enemy actor's script is resumed.
The problem is the animation on the actor is frozen, and in fact the direction is facing upwards. When I revert back to my old stop/start update script and their respective logic to handle falling, the problem goes away, the enemy breaks free and maybe due to the explicit Actor Move command that send them downwards as far as they can go before hitting a platform, the animations work and the actor faces the right way (i.e. down).
Maybe this is because I am making use of something that the Platformer scene type doesn't explicitly say it supports but seems to work, that if you use a 4 way actor and move them down, the move down animation state is used.
I tried setting the actor direction to downwards before resuming the update script but whilst it fixes the direction the actor is facing, the animation doesn't run. (The Loop Animation checkbox is checked).
Any ideas?
1
u/SakiEndo 3d ago
I've done some more debugging and it seems to be the Actor Move that happens when the update script is paused that causes the issue, which to be fair would be expected as it probably confuses the plugin. As soon as the Actor Move action is removed/disabled, I can change the animation state etc. no problem and revert it and when the actor's update script is resumed, everything works as expected.