RMMV YEP CUSTOM PASSIVE CONDITION HELP

Myers & Sparks

Veteran
Veteran
Joined
Jan 2, 2017
Messages
152
Reaction score
18
First Language
English
Primarily Uses
RMMV
Hey all!

Just had a quick question. Does Yanfly's Custom Passive conditions accept operators? such as && ? i ask because I am
creating a passive that requres shield and spear to both be equipped. If so can anyone tell me what i am doing wrong in my code?
Please and thanks. Here is said code:



<Custom Passive Condition>

if(user.isAtypeEquipped(7) && if(user.isWtypeEquipped(12)) {

condition = true;

} else {

condition = false;

}

</Custom Passive Condition>




So to recap. If spear and shield equpped. Allow passive. Currently It just gives the user the passive, even when nothing is equipped.
 
Last edited:

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
557
Reaction score
232
First Language
english
Primarily Uses
RMMV
you say sword and spear up top but shield and spear in the recap....
i can say && does work cus someone helped me with passive conditions before that have it.
i cant help though cus horrible at code. but thought would point out the contradiction with the whole sword/spear/shield thing cus really confusing. and think might need space between if (
but again, im hopelessly horrible with code
 

Myers & Sparks

Veteran
Veteran
Joined
Jan 2, 2017
Messages
152
Reaction score
18
First Language
English
Primarily Uses
RMMV
you say sword and spear up top but shield and spear in the recap....
i can say && does work cus someone helped me with passive conditions before that have it.
i cant help though cus horrible at code. but thought would point out the contradiction with the whole sword/spear/shield thing cus really confusing. and think might need space between if (
but again, im hopelessly horrible with code
sry meant spear and shield. will edit.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,940
Reaction score
1,047
First Language
Dutch
Primarily Uses
RMMV
lunatic code for custom passive works like all kind of operators,
like && (and), || (or), ! or !! or anything around those.
you just need to format it correctly in order to work.

but I think you need it around those lines:

</Custom Passive Condition>
if(user.isAtypeEquipped(7) && user.isWtypeEquipped(12)) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

the way you did,

"if(user.isAtypeEquipped(7) && if(user.isWtypeEquipped(12))"

you nested the "if" and also missing 1 ")" on the first part and it might not
work or not correctly.

I cant promise my way works but there are coders that know lunatic codes :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,017
Messages
1,018,356
Members
137,802
Latest member
rencarbali
Top