Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
My problem is, if i set the "fixed equipment" switch in the database, the quipment is fixed for the whole game. What I need is to fix the armor temporarily. Is there any way to do this?
THx
You can use this script to make the "Fixed" flags available
Code:
#---------------------------------------------------
# Equip Fix
#
# Setup Equipment fix so you can change it in game
#
# Use $game_party.actors[n].weapon_fix = false
# to turn off weapon_fix
#--------------------------------------------------
class Game_Actor
attr_accessor :weapon_fix # weapon
attr_accessor :armor1_fix # Shield
attr_accessor :armor2_fix # Helmet
attr_accessor :armor3_fix # Body Armor
attr_accessor :armor4_fix # Accessory
alias eq_fix_setup setup
def setup(actor_id)
actor = $data_actors[actor_id]
@weapon_fix = actor.weapon_fix
@armor1_fix = actor.armor1_fix
@armor2_fix = actor.armor2_fix
@armor3_fix = actor.armor3_fix
@armor4_fix = actor.armor4_fix
eq_fix_setup(actor_id)
end
def equip_fix?(equip_type)
case equip_type
when 0 # Weapon
return @weapon_fix
when 1 # Shield
return @armor1_fix
when 2 # Head
return @armor2_fix
when 3 # Body
return @armor3_fix
when 4 # Accessory
return @armor4_fix
end
return false
end
end
Use $game_party.actors[0].weapon_fix = false
to turn off the weapon fix for actor 1 in the party.
Use $game_party.actors[2].armor3_fix = true
to turn on Body Armor fixed for actor 3 in the party.