Conditional Issues

ItsAri

Villager
Member
Joined
Dec 9, 2019
Messages
9
Reaction score
4
First Language
English
Primarily Uses
RMMV
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?
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,585
Reaction score
3,780
First Language
English
Primarily Uses
RMMV

I've moved this thread to Javascript/Plugin Support. Please be sure to post your threads in the correct forum next time. 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).
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
150
Reaction score
92
First Language
French
Primarily Uses
RMMV
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..?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,477
Reaction score
6,854
First Language
German
Primarily Uses
RMMV
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.
 

ItsAri

Villager
Member
Joined
Dec 9, 2019
Messages
9
Reaction score
4
First Language
English
Primarily Uses
RMMV
It's working but now when I start the game she doesn't have it equipped at all, it happened when I removed the ()
 
Last edited:

ItsAri

Villager
Member
Joined
Dec 9, 2019
Messages
9
Reaction score
4
First Language
English
Primarily Uses
RMMV
I finally got it working, thanks :3
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,585
Reaction score
3,780
First Language
English
Primarily Uses
RMMV

@ItsAri , please avoid double posting, as it is against the forum rules. 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.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Working on a test Boss for the new No Travel Game Jam
- Name Plugin by Moghunter -
Free RPG Maker Ready Charging Up Animation

Enjoy -No Credit Needed But Appreciated -
Download it at https://lvgames.itch.io/free-charging-up-pixel-animation-fx-rpg-maker-ready
:/ .... so, thought I’d go to the park to sit in the cool breeze and get out of the house a little. Nope, guess that’s quarantined too. Ok...
How do you do when you want to work on projects but the game companies make so many games available for free because of the quarantine?
Kes
I have just stepped down from being a Mod, so please don't send me any more pm's with Mod questions. Thanks

Forum statistics

Threads
95,486
Messages
929,519
Members
125,729
Latest member
atsuya_sr
Top