Can I make an event occur with set chance?

Here's an example...


I made an agility shortcut to get to another part of my map quicker... the event should be PlayerActivate and then once the player does, provided he has sufficient agility level, he is teleported to where the shortcut would end up taking him. However, I don't want the player to succeed in this event 100% of the time. Ideally, I'd like it so there is a 25% chance he will fail to traverse the shortcut and lose HP trying.


Is there a way to do this?


Here's another example...


I made a dock with an old man standing out on the end, who offers the actor the opportunity to be able to go fishing off of his dock. If the actor chooses yes, I've set it so the screen fades out and then back in and then ChangeItem Fish +1 so a fish is added to the players inventory. But what if the player isn't so lucky and doesn't catch any fish. Can I set the ChangeItem Fish +1 event to only occur with a set chance? Like 30%?


Or is this not possible to do with events in a simple manner.


Sorry I am new to this. Thanks
the control variable comand also contains a random option. So what you want just needs a simple sequence of two commands, one control variable and one conditional branch to check the result.
Spoiler
SJ3CpNN.jpg



I think the example within the spoiler will be able to do what you want, at least for the first example. Let me know if you have any questions regarding any of the steps.

Original thread: https://forums.rpgmakerweb.com/threads/can-i-make-an-event-occur-with-set-chance.59424/