RPG Maker Forums

Hey all,

I've got a pretty simple question, scanned a few forums and couldn't find the answer. I've set up a system where an item/weapon/armor is stored in variable 101, and it's then passed back to a local event, which then uses that variable to know which item/weapon/armor to give the character.

i've set up a case handler to determine whether we're firing the give item, give weapon, and give armour command. the code i'm executing on giveItem is as follows:

$gameParty.gainItem($dataItems[$gameVariables.value(101)], 1);

now, this code works as intended. it looks up variable 101, goes, 'okay, V101 is 25, you want item 25', and gives it to you. but i can't find the equivalent commands for weapons and armors. here's my guesses:

$gameParty.gainArmor($dataArmors[$gameVariables.value(101)], 1);
$gameParty.gainWeapon($dataWeapons[$gameVariables.value(101)], 1);

they both don't work. throw error undefined and the console complains. does anyone know the correct commands for these two?

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,578
Members
137,843
Latest member
Betwixt000
Top