Target only user if not state affected?(YF Selection Control)

Icenick

Veteran
Veteran
Joined
Mar 28, 2012
Messages
271
Reaction score
32
First Language
English
Primarily Uses
Im having trouble making a skill that affects only the user and cannot be cast if state X is on user.

The skill adds state X to user but does nothing if X is already on the user. It does not work, it can only target user and if user has state X, it will then target any ally and scope is set to user.


<Cannot Select: All>
<Custom Select Condition>
if (target.isStateAffected(X)) {
condition = false;}
else {
condition = true;}
</Custom Select Condition>
<Select Conditions>
Not State: X
</Select Conditions>
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,654
Reaction score
1,106
First Language
EN
Primarily Uses
RMMV
Since your skill always targets the user, I think you'll need a different plugin: Selection Control determines who can be selected as a target of a skill, not whether a skill can be used. :kaoswt:

Maybe consider Yanfly's Skill Core plugin~
It offers a notetag that can control when a skill is usable:
JavaScript:
<Custom Requirement>
value = !user.isStateAffected(123);
</Custom Requirement>
This says "the skill is usable iff the user is not affected by state ID 123". :kaopride:
 

Icenick

Veteran
Veteran
Joined
Mar 28, 2012
Messages
271
Reaction score
32
First Language
English
Primarily Uses
Since your skill always targets the user, I think you'll need a different plugin: Selection Control determines who can be selected as a target of a skill, not whether a skill can be used. :kaoswt:

Maybe consider Yanfly's Skill Core plugin~
It offers a notetag that can control when a skill is usable:
JavaScript:
<Custom Requirement>[/INDENT]
[INDENT]value = !user.isStateAffected(123);[/INDENT]
[INDENT]</Custom Requirement>
This says "the skill is usable iff the user is not affected by state ID 123". :kaopride:
Awesome thanks! so much simpler than I made it to be!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I need to remember that if i want to learn to map like a pro, I need to spend hours doing it like a noob again and again… also, a cool map sometimes has hours/even days of work behind. I need to remember that too.
Yo there how's it going rpg community.
It's raining non stop since yesterday. The sound of the rain is so soothing.
I really miss the old style disney animated movies. I guess the last one was The Princess and the Frog from 2009. Now I am trying to collect every single one I can get on BD or DVD.
What I've seen from the MZ tiles looks pretty inconsistent, bleh. Every plant seems to be drawn in a different style.

Forum statistics

Threads
99,293
Messages
963,932
Members
130,905
Latest member
GhostAcc
Top