Conditional Branch: When INSERTBUTTONHERE is pressed...

As some of you may know, I'm trying to get the basics of a Tales-inspired Skit system through the use of Yanfly's Region Common events.

-I can get the balloon to pop up.

-When I have the conditional branch for the button being pressed, it only responds sometimes. Normally the screen should darken but I often find myself pressing the key to start the skit multiple times.

-The bubble should only pop up once while stepping on a tile where the skit is allowed. Likewise, it should dissapear when I'm off the region for the skit.

What do I do from here?
I've moved this thread to JS Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
The conditional branch event command only checks if the button is pressed in the very microsecond it is executed - it needs to be in a loop to wait for player input.


And somehow your loop is not constant, can you post a screenshot of it?
Here's what I have so far. It just creates the ultimate lag and then I can't even open the menu.

Jjjnyof.png


I'm sure Conditional Branches were a lot more powerful in RM2K3, I don't get the downgrade btw. Also, I'm sure there's a more convenient way to do this.
No, it doesn't create "ultimate lag" - it takes the game control away from the main game loop.


You need to use a parallel process if you want to continue playing while waiting for a key press.


I don't have time now to make one for you, but the button press loop has to be outside the event for the skit itself, you need to make another common event that is set to parallel and changes switches to activate the skit events when the button is pressed.


That parallel process would be triggered by a switch, and that switch turned on when a skit may be activated.
I am so sorry to be a pest Andar. I've tried what you've suggested and I'm getting a lot of lag. I've tried a party chat at the moment and I'm still getting an issue with the button press. Perhaps I should wait until there's a button press plugin?
mGTyHcj.png

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branch-when-insertbuttonhere-is-pressed.46618/