Player cancelling out of an event.

So right now I have mining and fishing events and while I like how they've come along, I'm wondering if there's a way I can let the player cancel out of the event if they want to stop. This is what I have right now.

Code:
Player swings pickaxe
Loop
  Wait: 60 frames
  Player swings pickaxe
  Variable Chance = 1-3
  Conditional Branch: Chance == 3
    Break Loop
Repeat Above
Show Balloon Icon: Player, Exclamation
Play SE: 'Hammer'
Text: "You obtained x ore!"
Change Items: [Ore] + 1
you need another condition inside the loop to break it, for example on button press or on inventory full or whatever.
Basically what Andar said. There's an option inside the conditional branch command for input triggering (page 4 I believe).
Yeah, that's what I originally tried, but I guess I'm just going about it wrong?

Code:
Player swings pickaxe
Loop
  Wait: 60 frames
  Player swings pickaxe
  Variable Chance = 1-3
  Conditional Branch: Chance == 3
    Show Balloon Icon: Player, Exclamation
    Play SE: 'Hammer'
    Text: "You obtained x ore!"
    Change Items: [Ore] + 1
    Break Loop
  Else:
    Conditional Branch: Cancel button is pressed
      Break Loop
Repeat Above

This conditional branch worked in a parallel process, but I guess for an event like this, the window is just too narrow maybe? Even as I spammed cancel it wouldn't stop.
Assuming that what you wrote in the code box is the layout of your event, your break for input trigger isn't in the right place. First of all, is there 2 loops in your event?

Code:
// Loop 1 start
Player swings pickaxe
Loop
  // Loop 2 start
  Wait: 60 frames
  Player swings pickaxe
  Variable Chance = 1-3
  Conditional Branch: Chance == 3
    Show Balloon Icon: Player, Exclamation
    Play SE: 'Hammer'
    Text: "You obtained x ore!"
    Change Items: [Ore] + 1
    Break Loop
  Else:
    Conditional Branch: Cancel button is pressed
      Break Loop
  // Loop 2 end
Repeat Above
// Loop 1 end

Correct me if I'm wrong.

But anyways, your break needs to break the biggest loop (loop 1 in your case). Currently it's only inside the loop 2. And do you want the game to only check the input when the condition that chance == 3 is false?
No, no, there's only one loop. The player swinging the pickaxe is the initial action, after this the loop begins.
Can you post the image of your event page?
https://i.imgur.com/DZmef7O.png

It's not the standard button check, but I tested it on its own and it works fine. In this event, though, it doesn't register.
@KingHazeel your second conditional branch is inside the first, that is the problem - it gets ony checked when both conditions are fulfilled.
it needs to be on the same level as the first conditional branch, not inside it - get rid of the "else".
Code:
Player swings pickaxe
Loop
  Wait: 60 frames
  Player swings pickaxe
  Variable Chance = 1-3
  Conditional Branch: Chance == 3
    Show Balloon Icon: Player, Exclamation
    Play SE: 'Hammer'
    Text: "You obtained x ore!"
    Change Items: [Ore] + 1
    Break Loop
  Conditional Branch: Cancel button is pressed
    Break Loop
Repeat Above
Didn't work unfortunately. ^^;
Can we see a screenshot of your amended event. Without that, your "didn't work" tells us nothing useful.
Oh, right, sorry. ^^;

https://i.imgur.com/oqUaFCR.png
I think your script went wrong. why didn't you use the original button pressed conditions, that is exactly what they are for.
I'm using Sixth's Control Configuration System which is why I need to check for those inputs--but no matter, I did manage to find an alternate solution. I changed the "trigger" conditions to "press" conditions and instead of relying on the cancel button I check if the player is moving up, down, left, or right.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/player-cancelling-out-of-an-event.110353/