RMMZ Loop Questions (ft. VS8 Region Activation)

Hi,

I'm having trouble with a short animation loop featuring BGM and BGS that is supposed to play on stepping on a certain region, and then fade out when the player steps away, both events controlling both regions with parallel processes.

The issue is that on subsequent visits when the player steps in the activation region for the animation loop, the event playing the animation loop fails to start over and instead resumes, wherever it's suspended at in the loop. This removes the foreground and background picture layers, as well as the BGM and BGS. So the scene functions properly until the player leaves the activation area.

The events then set up properly if the player leaves the area and returns, forcing EV003 to break its loop and start over.

I am using VS8 Event and Movement Core but I don't think it's related here, it's an issue that can only crop up because of the way the plugin triggers subsequent region activations and parallel processing in general.

The only code at the end of EV003 are multiple frames and then a standard loop ending.

I can partially get around this issue by including picture IDs/layers 1 and 3 inside the loop but that does nothing for the BGM and BGS once EV004 has erased them. There are other workarounds I can do here as well, but a lot of the image and sound quality depends on this being able to be triggered multiple times without the player casually breaking the scene loop until they leave the room (because leaving the room may trigger conditions preventing the scene from being shown again immediately during later implementation).

Screenshot 2024-05-26 185841.png


Screenshot 2024-05-26 184937.png
Parallel and autorun events run continuously - once per frame, 60 times a second.

Therefore, you almost never want to have a parallel event without Wait commands in it to prevent it from running every frame.

That also means you don't want event 3 to have a loop at all, parallel and autorun events already inherently loop.

Since you only want your event 4 to fade out and erase the pictures once, it should be player touch, not parallel.

I am using VS8 Event and Movement Core but I don't think it's related here
Even if getting rid of the loop fixes the problem, it's absolutely related because that's not how any events work in the default engine. Deactivating a parallel event and then reactivating it will not resume in the middle.
Parallel and autorun events run continuously - once per frame, 60 times a second.

Therefore, you almost never want to have a parallel event without Wait commands in it to prevent it from running every frame.

That also means you don't want event 3 to have a loop at all, parallel and autorun events already inherently loop.

Since you only want your event 4 to fade out and erase the pictures once, it should be player touch, not parallel.


Even if getting rid of the loop fixes the problem, it's absolutely related because that's not how any events work in the default engine. Deactivating a parallel event and then reactivating it will not resume in the middle.
Thanks as usual. I learn a lot about the engine when I read your replies.

I removed the loop but found that if EV003 is Player Touch the event doesn't loop anymore while the player is standing still on the tile. However, EV004 does what I intended if it's Player Touch which is to just erase all the picture layers and fade the music if the player walks over Region 46.

I did find that EV003 is still picking up the animation instructions in the middle and finishing it when set to Parallel, but then it does start over properly because the loop is gone. As you said, this is probably specifically because of how the plugin handles the event processing.

If that's the case, this is such a minor issue that it's not worth trying to keep things more fluid as long as the BGM and BGS aren't interrupted, which they aren't, so there's just a small delay on layers 1 and 3 coming back while a loop finishes on parallel. This is close to the functionality I wanted.

If this method continues to be full of quirks or processor-heavy, I think I'll switch back to standard labels, icons and action button triggers and run the loops and music normally. It just feels more fluid for our exploration and visual novel purposes trying to use this method.

For a first project, I think I'm okay with this as-is if it's just a quirk of the plugin's event handling.

Thanks again for entertaining my thinking out loud.
I removed the loop but found that if EV003 is Player Touch the event doesn't loop anymore while the player is standing still on the tile.
I'm glad you got it working acceptably. Just for the record - I didn't say you should make event 3 Player Touch 😛 Or, if you do, then you put a loop command in.

Original thread: https://forums.rpgmakerweb.com/threads/rmmz-loop-questions-ft-vs8-region-activation.169027/