Is it Possible to make Skill Scope Target Units with a Certain State?

Hey All,

Looking for a way to alter the scope of a skill to check for enemies/actors with a certain state? I've gotten really close to what I want, but I need a way to check for this before the skill occurs. Through web searching I found a way to do it after the skill has been executed through the damage formula: if b.state?(2); dmg = [X]; else; b.result.used = false; end; dmg

But I want it to happen before the skill is used. Does anyone know of any possible scripts or solutions that could help?
you want it to be at the "select target" part, or at the "action" part?
It will be an enemy skill. I'm using it to have them distinguish between a target they marked earlier and all the others on the field. So in round 1 they use a skill A that "marks" one of the actors by applying a state to him. In round 2 they will then "choose" to attack that actor with the skill B by "seeing" that he is marked with that state.

There's a bit more to what I'm doing than that but that's essentially what I'm going for.

Edit: All of that to say the "select target" part I guess?
maybe this can help? There's probably another way to do it though, but I wouldn't know.

That's MV so...no.

There is a VX ACE version but it doesn't seem to do what I need.
This one looks promising:
I'm not familiar with VX Ace's scripting system, though, so can't help you there. 😴
This one looks promising:
​
​
Yeah this might be a good start. Sadly, I don't know scripting or Ruby syntax. But at least it seems this might indicate it is possible.​
​
Thanks for this.​
​
Edit: Would it be something like this to get this script to work how I want?:​
<Scope condition: b.state(33)>​
Ok, this is for future generations:

If you're looking to solve this problem of making enemies/actors attack based on a state:

1. Use the following script: https://himeworks.com/2013/04/scope-conditions/
2. Go to the skill note tags section for the skill of your choice
3. Insert the tag: <Scope condition: b.state?(X) /> Where X is the number of the state you want the skill to target
4. Change the scope of the skill in the dropdown to "All Enemies"

Profit!

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-make-skill-scope-target-units-with-a-certain-state.128898/