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.

No Weapons

hey, i was wondering, is there a script wich makes it so when you don't have a weapon equipt you attack with your fists?
 

poccil

Sponsor

My suggestion was to change the _equip_ method of Game_Actor:

Code:
  def equip(equip_type, id)
    case equip_type
    when 0  # Weapon
      if id == 0 or $game_party.weapon_number(id) > 0
        id=WEAPON_FISTS if id==0
        $game_party.gain_weapon(@weapon_id, 1) if @weapon_id != WEAPON_FISTS
        @weapon_id = id
        $game_party.lose_weapon(id, 1) if id!=WEAPON_FISTS
      end

Here, WEAPON_FISTS is the ID of a fake weapon representing fists.
 

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