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.

Activating enhanced script trough equipement screen

What i'm looking for is a way that i cannot change my weapon but when the weapon slot is press that it activates a script like the enhanced weapon one for exemple.
 
The thing is, in my game, all the characters have there own weapon that they each keep thru-out the whole game.

there weapon are permanent. Only the armor are changeable. 

So what i'm looking for is when i'm in the equip menu and i press accept on the weapon slot, Instead of the standard list of equiptable weapon pop's up. I'd like it to activate this script instead ($scene=Scene_Enhance.new())

so what Diablosbud said is pretty much what im looking for.
 
Try this...

You'll need to set a callback variable(s) in your Scene_Enhance class if you want to come back
to the same place in the Scene_Equip menu.  $scene = Scene_Equip.new(actor_index, equip_index)
Code:
class Scene_Equip

alias new_update_right update_right

  def update_right
    # If C button was pressed
    if Input.trigger?(Input::C)
      if @right_window.index == 0  # Weapon
        $scene=Scene_Enhance.new()
        return
      end
    end
  end
end
 

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