Trigger a chance?

I don't know if it's a script or not.

So i am making a RPG Maker VX Ace game, in one of the map, i made a event that is sleeping.
If i walk past him, it triggers 50% chance (or i can change it) that it wakes him up, or did not wake him up.

It's like Conditional Branch, If 50% chance is triggered text will show up.

Is there script for this?
I don't think you need to a script. You can set a variable to "random". If you want a 50/50 chance, set it the random chance to only two numbers - 0 to 1 or 1 to 2 or whatever. Then it will randomly select one of those two values, which should be your 50/50 chance.

Then you can create the conditional branch - if the variable = 0, wake up, else don't wake up.

If you feel you still need a script, I can leave this here, but it seems this would be best in Ace support.

Original thread: https://forums.rpgmakerweb.com/threads/trigger-a-chance.94314/