State disappears when skill is used

So I have a "Hide" skill that lets the user avoid getting targeted by enemies.

The skill is meant to give the user an opening to heal and prepare, or potentially use a sneak attack. So I'd like a condition that would let me remove the "Hidden" state when another skill is used so that I can make the state last as long as the user wants, to give them an opportunity to let other teammates heal them and such.

Sort of like how you can remove a state when damage is taken, just remove it when any skill or attack is used, but if an item or guard is used, it won't be removed.

Any help or guidance would be appreciated. Thank you!
You could use the damage formula of the other skills: a.remove_state(HIDE_ID) ; your_damage_formula_here

Or you could like get a script like my http://forums.rpgmakerweb.com/index.php?/topic/24510-skillitem-apply-extension-v100/, and add an apply tag to the actor which would say something like:

Code:
<start_papply_ext>if item.is_a?(RPG::Skill) and item.id != 2  a.remove_state(HIDE_ID)end<end_papply_ext>
I'd rather not use the damage formula, since I would have to add it to every skill that this guy uses, which would clutter things. But I guess I will do it if nothing else works.

As for the script, I added it and tried using the tag you suggested, but I can't seem to get it to do... well, anything. I tried moving it from the actor to the skill that applies the state and the state itself, too, and tried using aapply instead of papply, but none of it did anything, so I'm not too sure how to approach it now...

By the way, I see that the tag you suggested is meant to exclude guard from the skills that can remove the state. Is there a way to exclude items as well?

Thanks for the help.
Couldn't this skill just call a common event that removes the state from the specified actor?
No, I don't mean a SPECIFIC skill removes the state. I mean that the state is removed whenever any skill is used except for guarding.
I'd rather not use the damage formula, since I would have to add it to every skill that this guy uses, which would clutter things. But I guess I will do it if nothing else works.

As for the script, I added it and tried using the tag you suggested, but I can't seem to get it to do... well, anything. I tried moving it from the actor to the skill that applies the state and the state itself, too, and tried using aapply instead of papply, but none of it did anything, so I'm not too sure how to approach it now...

By the way, I see that the tag you suggested is meant to exclude guard from the skills that can remove the state. Is there a way to exclude items as well?

Thanks for the help.

It already excludes items since it checks if the action was a skill.

as for how it doesn't work, can't check yet. But you could try using the other tags, like the one for after damage is done probably. It might be that the one I uploaded was an older version which I do think has a bug with the apply tags.

Original thread: https://forums.rpgmakerweb.com/threads/state-disappears-when-skill-is-used.36126/