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,788
Reaction score
2,232
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
10,103
Reaction score
6,392
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

Has it really been 50 streams? At this point it's just guilting me into pushing out a prototype. :kaoswt:



I should probably just bite the bullet and send it out, then go with my original plan to provide weekly updates.
I know it's just other small RM devs, but it still always feels legitimizing to have folks email me in private with a steam key, requesting a review of their game.:kaoluv: Look ma, I've made it to the big leagues.
time and time again I enjoy dramatic remarks on how I should find a better job.
As it stands, I go to work for 10-14 days a month. At work, I have time for my private projects. I arrive home, my mind is clear.
So yes, the pay sucks. But I have what so many lose after graduation. Freedom.
Came back cuz of the sale. Got MZ. The System 2 advanced settings for UI are so frustrating, and I see we still hate pixel fonts. Marvelous.
Did another YouTube short. This one has like 1k views (or maybe 380? Analytics is being weird). Getting them zoomer views, yo!

Forum statistics

Threads
129,718
Messages
1,204,643
Members
170,803
Latest member
JimGTz
Top