Status check for Yanfly Skill Core

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. 
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.
Thank you very much.

Now it work as intended 🙂
Does this work also? (Not at home)

Code:
if (user.isStateAffected(13)) { value = false; }
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.

Original thread: https://forums.rpgmakerweb.com/threads/status-check-for-yanfly-skill-core.52728/