Hello,
I'm testing my game's shopping mechanics with buying/selling weapons. I have a parallel common event running with a switch that is turned on with an autorun event as soon as the game starts, so this part works. This common event sets up some basic info, like setting variables and giving the player weapons.
When I set it up to give the player one (or 10) of each weapon, via the "change weapon" command, the inventory for those weapons is changed to 99 pieces, while my "change weapon" command is instructing it to add only 1. When I delete the command in this common event, the weapon is not in the inventory at all. When I add an extra command to this common event to first substract 99 pieces of this weapon and then add 1, it works correctly and there will only be 1 of this weapon in the player's inventory.
How is this possible? I can go ahead and set all to 0 with a script maybe (does anyone know which script call to make for this? Would ($gameParty.gainItem(weapon, -99)) work or is there a script call for setting instead of adding/substracting?), but this doesn't seem right to me. Nowhere in the events am I adding 99 of each weapon, which I think is also proven by the fact that if I remove the "change weapon" command, the weapon will not be in my inventory at all.
I'm testing my game's shopping mechanics with buying/selling weapons. I have a parallel common event running with a switch that is turned on with an autorun event as soon as the game starts, so this part works. This common event sets up some basic info, like setting variables and giving the player weapons.
When I set it up to give the player one (or 10) of each weapon, via the "change weapon" command, the inventory for those weapons is changed to 99 pieces, while my "change weapon" command is instructing it to add only 1. When I delete the command in this common event, the weapon is not in the inventory at all. When I add an extra command to this common event to first substract 99 pieces of this weapon and then add 1, it works correctly and there will only be 1 of this weapon in the player's inventory.
How is this possible? I can go ahead and set all to 0 with a script maybe (does anyone know which script call to make for this? Would ($gameParty.gainItem(weapon, -99)) work or is there a script call for setting instead of adding/substracting?), but this doesn't seem right to me. Nowhere in the events am I adding 99 of each weapon, which I think is also proven by the fact that if I remove the "change weapon" command, the weapon will not be in my inventory at all.