Is there any script or ways to remove all actor 2's inventory items except the latest obtained item?
Thanks in advance
Thanks in advance
I have no tracking separate inventories by actor. I mean to remove all items actor 2 has, if possible all item, equipments, and skills. and then only keep the most recent obtained item (from a chest). could equip or already equipped, whichever way is easier
const actor = $gameParty.members().find(member => member._actorId === x); // replace x with the ID of the actor you want to target
actor._equips = actor._equips.map(() => new Game_Item());
var actor = $gameParty.members().filter(function(member) { return member._actorId === x; })[0];
actor._equips = actor._equips.map(function() { return new Game_Item(); });
actor._skills = [];
$gameActors.actor(id)._equips = [];
$gameActors.actor(id)._skills = [];
$gameActors.actor(id)._equips = $gameActors.actor(id)._equips.map(() => new Game_Item());
Original thread: https://forums.rpgmakerweb.com/threads/remove-all-actor-2s-inventory-items-except-the-latest-obtained-item.104631/