Status check for Yanfly Skill Core

nerochepiace

Veteran
Veteran
Joined
Dec 1, 2015
Messages
48
Reaction score
2
First Language
italian
Primarily Uses
Hello to all!

I'm new to RPG Maker MV.

But I have a problem using lunatic mode in Skill Core Yanfly's Plugin (unexpected...).

I whant a skill that can be ONLY used when the user is in state 13.

<Custom Requirement>

user.states().contains(13) ?true :false

</Custom Requirement>

The problem is that the skill is always usable.

Thank for any help. 
 

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
229
Reaction score
74
First Language
German
Hello to all!

I'm new to RPG Maker MV.

But I have a problem using lunatic mode in Skill Core Yanfly's Plugin (unexpected...).

I whant a skill that can be ONLY used when the user is in state 13.

<Custom Requirement>

user.states().contains(13) ?true :false

</Custom Requirement>

The problem is that the skill is always usable.

Thank for any help. 
Well, you have to assign your true or false to the value variable for it to work, so you should try this:

<Custom Requirement>user.isStateAffected(13) ? value = true : value = false;</Custom Requirement>The isStateAffected()-function does the same as your states().contains.
 

nerochepiace

Veteran
Veteran
Joined
Dec 1, 2015
Messages
48
Reaction score
2
First Language
italian
Primarily Uses
Thank you very much.

Now it work as intended :)
 

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
147
Reaction score
24
First Language
English
Does this work also? (Not at home)

Code:
if (user.isStateAffected(13)) { value = false; }
 
Last edited by a moderator:

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
229
Reaction score
74
First Language
German
Does this work also? (Not at home)

if (user.isStateAffected(13)) { value = false; }
If you use that, the skill can only be used, if the character IS NOT affected by this state.

To use a skill if the character is affected by that state, you can use this:

if (!user.isStateAffected(13)) { value = false; }I looked through the script and you don't need to set value (for Custom Requirements) or visible (for Custom Show Eval) to true at all since it is the default.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Ugh! I have a headache coming on--not sure if it's from the sudden change in weather or caffeine withdraw...only one way to fi d out--Coffee time!
Found this old picture in the plastic case with my medical documents. I don't remember who this character is (I draw a lot of original characters and forgot about them very soon), but I like the design, may be I'll add guy in my game.

reading what makes plugins tick, so you can use other plugins to trigger said plugin... setup up Luna MV to have my own custom ATB Gauges from Yanfly's ATB. cool
It's Easter on Monday. Anybody got any Easter quarantine eggs? It'll also be my birthday, I'll be 31.
Sometimes I feel like I'm using plugins feature the wrong way. But as long as it works tho.

Forum statistics

Threads
95,797
Messages
932,013
Members
126,220
Latest member
Tonaxis
Top