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,290
Reaction score
1,928
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

Early WIP for my next entry. Since it's early you're going to need to wait a little longer than usual. What's that? You'll find out in my next update!
12.PNG
20 festive cards can now be unlocked in BiteMe!

The cards are permanent, but can only be unlocked in December!
Once the year is over, you won't be able to unlock the cards, or to upgrade it.
https://johndoenews.itch.io/biteme-storymodeCard141-160-Ad.png
Finally showing some updates again
I think it's ready - Chapter Selection:
unknown.png

Forum statistics

Threads
117,179
Messages
1,105,217
Members
153,301
Latest member
Vangerio
Top