RMMV Need Script Call To Remove Equipment From Certain Slot

Status
Not open for further replies.

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,308
Reaction score
1,936
First Language
English
Primarily Uses
RMMV
Exactly as the title says...I'm looking for a script call to remove w/e is in slot1 (not slot0). Thx!

Edit: I tried this but didn't work...$gameParty.menuActor().change_equip(1, $data_weapons[0]);
...which I got from https://www.rpgmakercentral.com/top...remove-equipment-of-actor-with-a-script-call/

Edit2: Looks like the function is actually .changeEquip() w/o the underscore...
JavaScript:
Game_Actor.prototype.changeEquip = function(slotId, item) {
    if (this.tradeItemWithParty(item, this.equips()[slotId]) &&
            (!item || this.equipSlots()[slotId] === item.etypeId)) {
        this._equips[slotId].setObject(item);
        this.refresh();
    }
};

Edit3: Also, it should be $dataWeapons[0] instead...gawd why was the post on that other forum so misleading?!

SOLUTION: $gameParty.menuActor().changeEquip(1, $dataWeapons[0]);
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,116
Reaction score
5,970
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

My new 49" monitor has been dispatched from the warehouse. Will it arrive tomorrow? The day after? I love that we can track packages now, even if it does only tell me when it's left that end and when it's arrived at the local centre. As long as it doesn't end up in Melbourne again, which has happened before ...
My friend's doing a surprise stream of my game Origin Hunt on Twitch here ! Feel free to stop by :yhappy:
Me, designing it a long time ago: Having an optional boss fight as a random chance to trigger when you fish in a certain spot with a certain type of bait is fun! Cool idea!
Me, trying to playtest everything again: oh god just let me see the boss, my bag is so full of fish!
both love and pain have no boundaries

Forum statistics

Threads
117,229
Messages
1,105,689
Members
153,386
Latest member
fredflol
Top