Conditional Issues

I'm using both Yanfly's Equip Core and Equipment Requirements, and I copied and pasted and even tried to modify the requirements myself but it still doesn't work.
Here's the Code:
<Custom Equip Requirement Condition>

var condition = true

if (user.name() === 'Lynn') {

condition = true;

} else {

condition = false;

}

</Custom Equip Requirement Condition>
It's possible I spelled the name wrong and my Java isn't the best, so is there a way that a certain weapon can only be equipped by a specific character with the Equipment Plugins?

I've moved this thread to Javascript/Plugin Support. Thank you.



Maybe try removing the () after the user.name. So it would look like something like if (user.name === 'Lynn') . I never really used YEP plugins a lot, but in the default engine the name property never really needed () (it wasn't a function, but more like a property).
Hello, I used those plugins and I just pasted your code in the notebox of a weapon in my project (only changing the character name to fit mine) and it worked: only the named character can equip the weapon bearing this notetag.
Simplier syntax would look like this:
Code:
<Custom Equip Requirement Condition>
   var condition = false
   if (user.name() === 'Name') {
     condition = true;
   }
</Custom Equip Requirement Condition>
But it should also work the way you writed it so it might be more a problem of other plugins compatibility or plugins order... Or you did mispelled your character name..?
you can also use an exclusive armor type to do this completely without any plugin.

You make an armor type "Lynn Armor" and have only the Lynn actor get that armor type, then all armors that have this type can only be equipped by that actor.
It's working but now when I start the game she doesn't have it equipped at all, it happened when I removed the ()
I finally got it working, thanks :3

@ItsAri , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


Great to know that everything is now working. If your thread has been answered, you can report it to be closed.

Original thread: https://forums.rpgmakerweb.com/threads/conditional-issues.118322/