Call Common Event When Skill Succeeds

Hi everyone

I have a skill that is meant to call a common event when it succeeds. All the common event does is turn on a switch. I have the skill's success rate set to 50%. My problem is that the common event occurs even when the skill misses. Is there an easy solution to this? Thanks for reading!
Use an invisible state or something like that to indicate success, and have the common event check the existance of that state before turning on the switch
Use an invisible state or something like that to indicate success, and have the common event check the existance of that state before turning on the switch
This solution sounds perfect but I seem to be having trouble with implementing it. I've set my skill to add a state at 100% to an enemy if the skill succeeds. My skill also still runs the common event. I've changed the common event to check if the enemy has been inflicted with the state and if it has to then turn on my switch. For some reason the state doesn't seem to be taking to the enemy. I've added in some filler text to show up when the enemy is inflicted with the state but that text is not appearing.
then post screenshots of skill, state and common event - we need more info to find out where you made a mistake.
Skill

 

State



Common Event


 

 

Here's a screenshot of where the switch is used. It opens up text options on an enemy


 

Thanks again for the help
1) the common event only checks enemy #1, if a troop has more enemies and the player selects a different on eit will not trigger

2) common events are processed at the end of the battleturn, not the second the skill is applied - which means the switch will only happen next turn.

Does that help solving the problem?
1) the common event only checks enemy #1, if a troop has more enemies and the player selects a different on eit will not trigger

2) common events are processed at the end of the battleturn, not the second the skill is applied - which means the switch will only happen next turn.

Does that help solving the problem?
1)In my game every troop will only ever have one "enemy" so that shouldn't affect it.

2)My game also will only ever have one character in the party and the "enemy" will never have actions it performs so the entire battle process is just the player taking turn after turn after turn.
Do you have any script that might affect the states? Because that state should be applied normally.

Two other things to locate the problem:

1) give the enemy an additional test skill in the attack pattern, conditioned to be available only when the state is applied and with a rating that is 5 point higher than any other rating. If that skill is then used, you'll know that the state had been applied and the problem is with a later part of the logic

2) give a screenshot of the enemy, so we can check if some of the values are preventing the state from being applied (for example, LUCK affects the state rates - a very lucky enemy will often evade state inflictions)
Do you have any script that might affect the states? Because that state should be applied normally.

Two other things to locate the problem:

1) give the enemy an additional test skill in the attack pattern, conditioned to be available only when the state is applied and with a rating that is 5 point higher than any other rating. If that skill is then used, you'll know that the state had been applied and the problem is with a later part of the logic

2) give a screenshot of the enemy, so we can check if some of the values are preventing the state from being applied (for example, LUCK affects the state rates - a very lucky enemy will often evade state inflictions)
When you mentioned scripts I realized I'm running a few plugins. I'm running Yanfly's Core Engine and Battle Core. Turning these plugins off solved my problem and everything worked as i wanted it too. I isolated the problem to the Battle Core plugin. I also changed the parameters in the Battle Core plugin to show state messages so I now know that the state was working and the enemy was inflicted with it. I deleted the plugins and then added them back in to make sure they were set to the default settings. If I have to continue without the plugin I can live with that but if there is some simple thing I am missing here I'd prefer to resolve it that way and continue with the plugin. 
Yanfly has updated several plugins already due to errors inside them - please check if you have the latest versions installed


Other than that, point the problem out in the correct plugin topic and Yanfly will check them.
Yanfly has updated several plugins already due to errors inside them - please check if you have the latest versions installed

Other than that, point the problem out in the correct plugin topic and Yanfly will check them.
I updated the plugins and that was all that was needed. I should've mentioned I was using plugins, sorry to give you the run around. Thank you so much for your help

Original thread: https://forums.rpgmakerweb.com/threads/call-common-event-when-skill-succeeds.51260/