You don't even explain how you did it before in 2k3 and how you are doing it now in XP. No one can help you until you explain your methods.
Quote from: KK20 on May 14, 2013, 07:34:33 pm
You don't even explain how you did it before in 2k3 and how you are doing it now in XP. No one can help you until you explain your methods.
It´s basicly quiete easy
Hero X uses Skill Y = a trrop event changes Hero X´s equipment to Item Z
There its a realy easy formula which worked perfectly in 2003
but for some reason the troop events in XP wont do that
Quote from: gameus on May 15, 2013, 08:22:25 am
You could just attach a common event to a skill.
Doesnt work eather allready tried apperntly you cant changed the equipment in battles
Ah, I think I know what the problem is. In RMXP, in order to equip any item, the party must possess one. Lookie:
def equip(equip_type, id)
case equip_type
when 0 # Weapon
if id == 0 or $game_party.weapon_number(id) > 0 #<===== This right here is the problem
$game_party.gain_weapon(@weapon_id, 1)
@weapon_id = id
$game_party.lose_weapon(id, 1)
end
Try adding the weapon to the party first, then equip. Of course, if the weapon is not supposed to be in the party, you will have to remove the weapon(s) at the end of every battle.
Edit: I think you can also remove that 'if' statement, making the code look like this:
def equip(equip_type, id)
case equip_type
when 0 # Weapon
$game_party.gain_weapon(@weapon_id, 1)
@weapon_id = id
$game_party.lose_weapon(id, 1)
Of course, you still have to remove the weapon(s) at the end of every battle. You can find this in 'Game_Actor' around line 395.