MV YEP Action Sequence: % State Apply

This is for MV.

So, I'm using Yanfly's Action Sequence plugins. Works great. I have an attack where I want a state to apply randomly (percentage based). We can do this via "Add State" under the skill's Effects Section and set the %. However, I want more control through the actual <target action>. Mostly because when a state applies... I have an animation that plays out, but I want that animation to play through the action sequence so I can time it perfectly. Is there any sort of "IF condition" I can run within the <target action> that would check a % and either apply or not apply that state? Essentially, I'd like to be able to set the odds of that state applying... so not 50/50... more like... 25% chance the state will apply and 75% nothing.

Figured I'd ask here. I couldn't find anything online, and nothing stuck out to me when looking through the plugin itself.

Thanks in advance 🙂
The base Action Sequence Pack 1 has an "if" command.

The condition for it is straight JavaScript, so you can just use the default random function, e.g.:
Code:
if Math.random()<.75
    add state 4: target
end

will have a 75% chance to apply state 4.
The base Action Sequence Pack 1 has an "if" command.

The condition for it is straight JavaScript, so you can just use the default random function, e.g.:
Code:
if Math.random()<.75
    add state 4: target
end

will have a 75% chance to apply state 4.
As always... you're amazing! TYSM for always replying and what you do for this community. I don't think we all say it enough. If you had a Patreon, I would 100% donate to you! You're the best! 🙏

*EDIT* Woopsie. I said the naughty P-word LOL
Wow, when you refer to "the naughty P-word" your mind and mine go to very different places 🤣
Wow, when you refer to "the naughty P-word" your mind and mine go to very different places 🤣
Oh, wait! LOL I'm now realizing how that sounds. Def referring to the one that starts with a P and ends with "ON" 😂

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/yep-action-sequence-state-apply.153566/