Possible to equip a weapon based on a state?

The A-ster

Villager
Member
Joined
Jun 14, 2017
Messages
21
Reaction score
4
First Language
English
Primarily Uses
RMMV
Before I begin, yes. I know this is the wrong thread to post in. Problem is that I can't quite find a "help me, I'm trying to do really complex stuff and need complex help" thread. Please move it where it should go so that I know where to go next time. Thank you!

Anyway, I'm trying to do some Maker Magic. When you use a skill (say for instance, "Metal Make: Sword") I want it to add a state, which equips a weapon for a bit. After the state ends, I want it to unequip. Tried a parallel common event, but it didn't do anything. Ypu can set the ability to equip a weapon TYPE, but not a specific weapon. I was able to accomplish this with a common event that equipped it after the spell was used, but it didn't make it to where the weapon would unequip. Any help welcome. Thanks!
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,004
Reaction score
4,744
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to MV Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,318
Reaction score
1,202
First Language
English
Primarily Uses
RMMV
Yanfly's Buffs & States Core lets you add effects to states that trigger when they expire. Then something like this would probably work:

Code:
<Custom Remove Effect>
user.changeEquipById(1, null);
</Custom Remove Effect>
Or if you want the weapon completely vaporized instead of dropped to the inventory:

Code:
user.forceChangeEquip(0, null);
Note: Both of these assume the weapon is in the first slot. if it's different, you'll need numbers that correspond with the appropriate slot id. (changeEquipById is +1 higher than forceChangEquip for the same slot)
 

The A-ster

Villager
Member
Joined
Jun 14, 2017
Messages
21
Reaction score
4
First Language
English
Primarily Uses
RMMV
@Aesica Thanks! I might give it a try, though an idea was growing on me for being able to sell these items for a little extra Gold if needed by the player. Thanks once more!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I spoke with hudell and many programmer about the Window_BattleLog class and we all just agreed to pretend this class just doesn't exists lol
I haven't been able to solidify a cohesive plot so dropped out of a game jam but, on a fun note, I pre-ordered MZ today! :LZSwink:
So I just spent the weekend...playing my own game. The one I released last year. Yep you heard that right.
Goal for MZ? None... I'm still curious how to finish my VXA project and how it looks like when it actually finished. Which will take at least another two years. Coming late again to the party.

Forum statistics

Threads
100,657
Messages
978,136
Members
132,268
Latest member
janetjoradan
Top