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,293
Reaction score
1,929
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,115
Reaction score
5,968
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 Posts

Latest Profile Posts

Nightmare... Dreamt I posted a GFX resource post. With a work in progress glove icon that tinted to different colors. In the wrong forum. And I was in such a panic. I saw people writing posts in response, those "..." you see in discord and such. So I frantically tried to report my post as wrong forum, editing to say it's the wrong forum and that I "accidentally" posted it too early... Very odd dream to be honest...
The youngest photo of you is also the oldest photo of you.
People need to stop submitting their game to every single game jam without even reading the jam rules (╯°□°)╯︵ ┻━┻
Mom tested positive for COVID thanks to a single stupid coworker of hers not taking sh*t serious.
I'll prolly won't be on here for a while as we deal with this.
So before I inevitably start a new project to reorganize myself (I will make sure to save important info dw), I will make an external list of what I want in the final database.

Forum statistics

Threads
117,205
Messages
1,105,444
Members
153,345
Latest member
Jokerlyzer
Top