Quintus

Veteran
Veteran
Joined
Nov 9, 2017
Messages
38
Reaction score
6
First Language
English
Primarily Uses
RMMV
Hi, so I'm using Yanfly's Weapon Unleash and I want to use the replace attack function but only when the player has a specific state and weapon. I think this is doable by using lunatic mode, the example included is

<Custom Replace Attack>
if (user.level > 50) {
id = 50;
} else {
id = 0;
}
</Custom Replace Attack>

but I don't know enough java script for it to check for a state instead of level.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,503
Reaction score
729
First Language
indonesian
try:
Code:
user.isStateAffected(50)
to check if user inflicted with state 50... change 50 to the state id you want...

hope this help.
 

Quintus

Veteran
Veteran
Joined
Nov 9, 2017
Messages
38
Reaction score
6
First Language
English
Primarily Uses
RMMV
try:
Code:
user.isStateAffected(50)
to check if user inflicted with state 50... change 50 to the state id you want...

hope this help.
Yes, that worked. Thank you!
 

Latest Threads

Latest Posts

Latest Profile Posts

 …I think I might need to switch from standard ATK/DEF up/down buffs to parameter altering states. I just had an actor whose usual attack against an enemy does ~25 do a buffed attack against a debuffed enemy for ~600…
just saw that titan quest is free on steam until the 23rd
Zombie status is now complete. I didn't have to do much in the way of changing how healing is applied to undead targets, was just a simple 3 line code. I thought I had to overhaul Game_Action lol. Everything else was doable by events. So.. Zombie: You turn undead. Your element changes to darkness. You're weak to light, you're strong to physical attacks and healing hurts you and revival items will kill you.
My Overworld might be a mix of inspiration from 2D Final Fantasy games, Breath of Fire, Battlechasers: Nightwar, Super Mario World, and Pillars of Eternity. If I can make it more in-depth than just walking from point A to point B, that might do a lot for the gameplay experience. Hmm...

Forum statistics

Threads
115,226
Messages
1,088,223
Members
149,817
Latest member
Cythulhu
Top