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.

Forcing an actor to wear only certain items(VX)

Essentially what I want is the ability to do 'fix equipment' on only certain pieces of equipment. Basically I have a character who is a wolf who has 'Fangs' as his weapon and 'Fur' for his armor. I do not want these to change except during certain events. However, I would like him to be able to wear different accessories (collars). So what I need is a script to fix his Weapon and Body armor slot, but still allows players to change his accessories just like any other character. This is sorta similar to how Ayla from Chrono trigger only has her Fist as a weapon and it upgrades as she levels.

I don't know if it matters, but I'm using the GTBS and may add other scripts later, but I think this would be something simple. If it helps, the character(Oz's) actor id is 2 and the weapons are: fangs: (weapon id 2) and his armor is: Furry coat(armor id: 3).
 
yeah so umm.. I do use VX and you can't. You can fix all or fix none, those are my options within the software. So yeah if anyone could tell me the syntax of a script to fix just the weapon and body armor that would be sweet.
 
You could just make Fangs & Fur the only equip-able weapon & armor for that class.
But then he could still remove his fangs & fur. (not likely, but still)

This snippet will prevent actor 2 from changing his weapon or body armor, but leave the shield, helm & accessory slots open.

Code:
class Scene_Equip

  #--------------------------------------------------------------------------

  # * Update Equip Region Selection

  #--------------------------------------------------------------------------

  def update_equip_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      return_scene

    elsif Input.trigger?(Input::R)

      Sound.play_cursor

      next_actor

    elsif Input.trigger?(Input::L)

      Sound.play_cursor

      prev_actor

    elsif Input.trigger?(Input::C)

      if @actor.fix_equipment

        Sound.play_buzzer

      #----------------------------------------------------------------

      # Add this to prevent actor 2 from equipping weapon or body armor

      #----------------------------------------------------------------

      elsif @actor.id == 2 && (@equip_window.index == 0 || @equip_window.index == 3)

        Sound.play_buzzer

      #----------------------------------------------------------------

      else

        Sound.play_decision

        @equip_window.active = false

        @item_window.active = true

        @item_window.index = 0

      end

    end

  end

end

Paste above Main
 

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