How to make a battle that is triggered from a certain event but doesn't always happen

Hi so in my game I have a bunch of rocks and I want there to be a % chance that a spider will attack you. I would be very


appreciative if you made it so that the % chance could easily be changed. Thank you 🙂
Just use Control Variables with Random Number between 1 and 100, then Conditional Branch to see if it's less than x%.  If you want to change x, use another variable that you can change whenever you want to increase/decrease the chance, then use that variable in the Conditional Branch too.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-battle-that-is-triggered-from-a-certain-event-but-doesnt-always-happen.59791/