Autoequip. Event Command that makes a player automatically equip a weapon or armor.

I have searched this site, google, Yanfly's and another community for this feature to no avail.


I want players to have the choice to equip weapons and armor from a defeated opponent at the cost of discarding their own.


I have already made some commands asking players if they wish to loot each weapon and armor from their defeated opponent, but I don't want them to walk around storing equipment, I want them to make a choice at that moment. This is why autoequip is necessary.


Example:


My character has a wooden club and a shield. I defeat an opponent with leather armor, a short sword and a bronze shield.


The event command asks:


"Will you take his weapon and drop your own? Yes or No"


If Yes, then the wooden club is deleted(but dropped on the floor and able to be recovered later is ideal!) and the sword is equipped automatically without needing to go to the Equip menu.
If no, then the next question "Will you take his shield and drop your own? Yes or No"
Etc, etc until all of the equipment of the opponent is covered with the same choice.
There's an event command named: Change Equips.
Yes, but it only moves equipment to the inventory and does not make the player equip it.
I rechecked again and I was wrong. I'm sorry to have wasted boardspace.
https://docs.google.com/spreadsheets/d/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs


at the end you will found script call and a lot of example to this

Code:
item = $dataWeapons[n] or $dataArmors[n] 
$gameActors.actor(actorId).changeEquip(slotId, item);
No, Change Equips changes what each actor has equipped.  It has to be in your inventory first.  Change Weapons and Change Armor put it there.  So just give them the choice, and if they say yes, do Change Weapons followed by Change Equips.
No, Change Equips changes what each actor has equipped. It has to be in your inventory first. Change Weapons and Change Armor put it there. So just give them the choice, and if they say yes, do Change Weapons followed by Change Equips.
you are a genius 🙂 that fixed my problem hope it helped the others

Original thread: https://forums.rpgmakerweb.com/threads/autoequip-event-command-that-makes-a-player-automatically-equip-a-weapon-or-armor.74021/