Condition for Skill Selected/Preparing/Loading/Readying?

How can I use 

@subject.current_action?.item

(or whatever else) as a condition for saying "If a certain skill is selected to be used"? 

In this instance, I'll be using Passive States

http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/passive-states/

but I would also like it so that events and enemy strategies (using scripts) will also use this condition as well.

 

For example, for Passive States, I want the condition for State 150 "Focus Loss" to be ((Skill 200 "Fire III" is selected to be used and State 151 "Skill Completed" is not applied and Skill 200 is able to be used) or (Skill 201 "Ice III" is selected to be used and State 151 "Skill Completed" is not applied and Skill 201 is able to be used)) and soforth. I already know how to do 'if state is not applied' and 'if skill x is usable'.

 

Like say I want to have it so that if a battler's selected move is Thunder III, they'll gain the state Focus Loss but they'll also get the state Petty Projectile Reflect. And then using Yanfly Destruction, I'll have it so that after Thunder III is used, those states will be removed, then the state "Skill Completed" will be applied.

 

I know that technically skills aren't "loading" until they are about to be used. Not at the beginning of the phase.

But given the fact that the game registers which skill each battler has been set to use for the battle phase, and if you consider Yanfly's Cast Animations

http://yanflychannel.wordpress.com/rmvxa/battle-scripts/cast-animations/

https://github.com/Archeia/YEARepo/blob/master/Battle/Cast_Animations.rb

these animations load when you have a certain skill selected.

 

I was using 

Yanfly Lunatic Objects and that's when I noticed that either there's no "Skill Load" feature, or Prepare Effect just doesn't work when it should (although the others work fine)

http://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-objects/

 

Think on how fighting games, certain skills will have higher priorities than others, so while readying the move, you'll be invunerable to skills with a lesser priority, or like how say that before using the skill "Leapstrike", your character will have the state "Aerial", or like how you reflect lesser projectiles while the skill is loading, or, one of my personal desires uses, which is lowering or raising someone's Focus while they ready a move, among other various effects I'd like to do with this.

 
you can replace @subject with any battler object so you can do like


$game_party.members[0].current_action.item.id == ID_OF_SKILL


or if for the target, b.current_action.item.id == ID_OF_SKILL


though if the battler have already acted, I think current_action will already return a nil object
It took me a few reads to understand the question.. and I may still be confused, so I will summarize what I think you are asking:

Using Victor's Passive States. You want to apply a state called Focus Loss.

The conditions for Focus Loss to be applied passively are the following:

1. Fire/Ice/Thunder III is selected

2. Skill Completed State is NOT applied

3. Fire/Ice/Thunder III is useable.

If that is the case... Unless using Fire/Ice/Thunder III disables its use immediately, why not just have Fire/Ice/Thunder III apply a state that you can check for in the passive conditions. so instead of the list above you would be conditioning the passive state using these 3:

1. Fire/Ice/Thunder State (A state applied to the user when they use any of these spells)

2. Skill Completed State is NOT applied

3. Fire/Ice/Thunder III is usable.

Again I may be very confused by the post, but it seems like all of the ideas you listed could be solved by simply applying a state at the right time instead of a script call to see when a skill is used. When you use a skill to initiate a charge for the next turn, just have the initiating skill apply a state that grants those abilities through the passive state script.

If I misunderstood I am sorry, and you can ignore this response.

~ Dinhbat
That is what I'm asking.

Sorry.

That works, um, *doesn't know what to call you besides "Shana" lol* but no, apparently the skill is still "selected" after it's used.

Passive States adds a state without a duration and removes it when the condition is not true. And the state does not remove itself after skill use until you add additional conditions to prompt it to do so.

The notetag goes as follows:

<passive state: (state for "Focus Loss")>(self.current_action.item.id == (id of "Fire III") && !self.state?((state for "Skill About to Start")) && self.usable?($data_skills[(id of "Fire III")])) or (self.current_action.item.id == (id of "Ice III") && !self.state?((state for "Skill About to Start")) && self.usable?($data_skills[(id of "Ice III")])) or (...);</passive state><passive state: (state for "Lesser Projectile Reflect")>(self.current_action.item.id == (id of "Fire III") && !self.state?((state for "Skill About to Start")) && self.usable?($data_skills[(id of "Fire III")])) or (self.current_action.item.id == (id of "Ice III") && !self.state?((state for "Skill About to Start")) && self.usable?($data_skills[(id of "Ice III")])) or (...);</passive state>then 

using Lunatic Objects, skills that have prepare-effects will have the notetag

<before effect: add state (state for "Skill About to Start")>and you can use this process for something like Leap Strike as well, where the actor will avoid certain moves (like Low Sweep and basic attack) yet the ones they won't avoid, they can't dodge, by using Action Dodge http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/action-dodge/

and you can have it so that skills that do connect while they're leaping have a chance to remove that Leap Strike state, using Action States http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/action-states.

Original thread: https://forums.rpgmakerweb.com/threads/condition-for-skill-selected-preparing-loading-readying.26034/