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

Icenick

Veteran
Veteran
Joined
Mar 28, 2012
Messages
275
Reaction score
37
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,660
Reaction score
1,111
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
275
Reaction score
37
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 Posts

Latest Profile Posts

The more I look at the QPlugins... The more I am amazed at what they can do. Which I'm not going to lie is pretty awkward, because I already consider them far and away the best plugins MV has to offer. :kaoback:
spending a week trying to figure out what was wrong with my font has me DED
504 threads to go upon the time of this post until the forum reaches 100k threads. Thread Dead Redemption. Thready Van Halen. Thread Zeppelin. Doesn't have to be a band or a game
Random thought: Looks like putting in effort in learning a language is like a taboo for most people. :kaoswt2:
Not sure about RPG Maker MZ ; We see a lot of things, but they could have enhanced a lot of things in MV first... We're at the era of updates nowadays, not new products over and over and over :/

Forum statistics

Threads
99,500
Messages
966,113
Members
131,130
Latest member
Player-Unknown
Top