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

Icenick

Veteran
Veteran
Joined
Mar 28, 2012
Messages
269
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,653
Reaction score
1,105
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
269
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

Hosting a private game jam...might have smthng to post soon if I can fix these dang parallaxes.
Oof it's been a while...well I'm back to stay!
Gosh I hate fireworks. Especially if you cant even see em. Its just noise. Noise that scares my pets.
Some (totally) differfent (more traditional) Goblin faces...

what do you guys think?
My game = 4.5k hours, 4 years+ and should be done in 3 weeks!!

OMG so excited!

I plan to finish before my b day, July 21st.

Forum statistics

Threads
99,238
Messages
963,312
Members
130,820
Latest member
viewtifuljoe
Top