Envision, Create, Share

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.

VX Always have armor equiped?

tuti05

Member

I set up a bunch of conditional events that makes the Hero change graphics after equipping certain armors. But if i unequip an armor then the character will stay with that graphic. I tried making it go back to the normal shorts graphic but it seems impossible.

So to fix that i'm requesting a script that makes the character have to be equipped with something at all times. You know when you go to the in game menu to equip things, i just want to take out that blank spot that allows you to unequip armor. thanks
 
This will overwrite the update_item_selection method in Scene_Equip and will make it so that the player cannot unequip his/her equipment. It will instead play a buzzer sound whenever the player tries to unequip something.
Code:
class Scene_Equip < Scene_Base
  #--------------------------------------------------------------------------
  # * Update Item Selection
  #--------------------------------------------------------------------------
  def update_item_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @equip_window.active = true
      @item_window.active = false
      @item_window.index = -1
    elsif Input.trigger?(Input::C)
      item = @item_window.item
      Sound.play_buzzer if item.nil?
      return if item.nil?
      Sound.play_equip
      @actor.change_equip(@equip_window.index, @item_window.item)
      @equip_window.active = true
      @item_window.active = false
      @item_window.index = -1
      @equip_window.refresh
      for item_window in @item_windows
        item_window.refresh
      end
    end
  end
end

Just place the script in a new section above Main.
Good luck tuti05! :thumb:

Over and out - Gando
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top