I was inspired by another user (I can't recall who) to modify the Game_Actor class so that it automatically equips the weapon with an id of 1, called fists, when a weapon is unequipped. Obviously I also want to make the fists disappear instead of being put in the inventory when a weapon is equipped. The weapon called fists has 0 attack, and the idea is, of course, to be able to fight unarmed. Anyway, I'm definitely on the right track because the only problem arises when I go to switch weapons. It may be the only problem, but it's a big one; the weapon that is supposed to be switched out disappears instead. What I did is quite simple. I changed this part of the script...
if id == 0 or $game_party.weapon_number(id) > 0
$game_party.gain_weapon(@weapon_id, 1)
@weapon_id = id
game_party.lose_weapon(id, 1)
to...
if id == 0
$game_party.gain_weapon(@weapon_id, 1)
@weapon_id = 1
else
@weapon_id = id
$game_party.lose_weapon(id, 1)
end
Now here's the thing. Everything I've tried to change has caused a different problem, including putting the 'or $game_party.weapon_number(id) > 0' back. The main problem that arises from changing it is the 'Fists' item appearing in the inventory in multiples. Besides looking incredibly sloppy, it just plain wouldn't make sense for that to happen, obviously. Any help would be greatly appreciated, as I've never scripted before and am surprised that I even got it working this much.
if id == 0 or $game_party.weapon_number(id) > 0
$game_party.gain_weapon(@weapon_id, 1)
@weapon_id = id
game_party.lose_weapon(id, 1)
to...
if id == 0
$game_party.gain_weapon(@weapon_id, 1)
@weapon_id = 1
else
@weapon_id = id
$game_party.lose_weapon(id, 1)
end
Now here's the thing. Everything I've tried to change has caused a different problem, including putting the 'or $game_party.weapon_number(id) > 0' back. The main problem that arises from changing it is the 'Fists' item appearing in the inventory in multiples. Besides looking incredibly sloppy, it just plain wouldn't make sense for that to happen, obviously. Any help would be greatly appreciated, as I've never scripted before and am surprised that I even got it working this much.