What's the script line to equip a given armor to a given character (for instance armor ID 12 to actor ID 3)?
Snippet of code to equip a specific armor
RPG Maker VXAce Support
Code:
$game_actors[your_actor].change_equip(slot_id, item)
Code:
$data_armors[id]
$data_weapons[id]
Thank you, the "shield" has which slot_id, 1 or 0?
EDIT:
I used the following command and it gave me an error message:
$game_actors[2].equip_item(1, $data_armors[51])
Both actor 2 and armor 51 were available.
EDIT:
I used the following command and it gave me an error message:
$game_actors[2].equip_item(1, $data_armors[51])
Both actor 2 and armor 51 were available.
Sorry, I just checked and it looks like my memory was failing me: the method is change_equip (same arguments). I will correct that in my first post as well. By the way, "shield" is slot 1, slot 0 is your weapon.
$game_actors[2].change_equip(1, $data_armors[51])
does work. Thank you very much. :ninja:👍
does work. Thank you very much. :ninja:👍
Original thread: https://forums.rpgmakerweb.com/threads/snippet-of-code-to-equip-a-specific-armor.111622/