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.

Mr.Mo's Neo Abs Gun/ammo problem

When i try to equip a gun and then i use it it doesnt use up the ammo i have in my items
instead it shows up as 0 ammo but when i check my items it says i have 99 ammo still
any help?
Code:
#===============================================================================
# ** NeoABS Settings - www.unknowncoders.com
#-------------------------------------------------------------------------------
# Author    Mr.Mo "Muhammet Sivri"
# Version   1.0
# Date      11/25/07 (m/d/y)
#===============================================================================
module UCoders
  #-----------------------------------------------------------------------------
  # * Constants
  #-----------------------------------------------------------------------------
  #=======================V 1.5=================================================
  Allow_Combo_Display = true
  #=======================V 1.0=================================================
  Player_Animation = false # Animate the Player?
  Enemy_Animation = false  # Animate the Enemy?
  #-----------------------------------------------------------------------------
  Max_Actors = 4              # Max amount of actors allowed in party.
  #-----------------------------------------------------------------------------
  Attack_Key = Input::Letters["S"]
  # The default Hotkeys that can be used on skills. However, you can set hotkeys 
  # for individual actors/characters in the game using code given in FAQ.
  # YOU CAN ADD OR REMOVE more buttons, this example shows how you can add each
  # kind of buttons. Letters are Input::Letters["A-Z"] and Numbers are Input::Numberkeys[0-9].
  Skill_Keys = {Input::Numberkeys[1] => 0,
                Input::Numberkeys[2] => 0,
                Input::Numberkeys[3] => 0,
                Input::Numberkeys[4] => 0
                }
  # You can use a skill key for item key as well, but I used some other buttons here.
  Item_Keys =  {Input::Letters["Q"] => 0,
                Input::Letters["W"] => 0,
                Input::Letters["E"] => 0
                }
  #-----------------------------------------------------------------------------
  # Defend key.
  DEFEND_KEY = Input::Letters["D"]
  # Can the player defend?
  CAN_DEFEND = true
  # Defend Animation that will be played if the player animation is turned on.
  DEFEND_ANIMATION = "_defend"
  # Defend Mash
  DEFEND_MASH = 3
  # How much of the attack will be canceled out?
  Defend_Demage_Percent = 50 
  #-----------------------------------------------------------------------------
  #Ranged Skills
  Range_Skills= {}
  # RANGE_SKILLS[Skill_ID] = [Range, Move Speed, Character Set Name, Mash Time(in seconds), Kick Back(in tiles)]
  Range_Skills[7] = [10, 4, "Magic Balls", 3, 1]
  Range_Skills[10] = [10, 4, "Magic Balls", 3, 1]
  Range_Skills[33] = [10, 4, "Magic Balls", 3, 1]
  Range_Skills[15] = [10, 4, "", 3, 1]
  Range_Skills[81] = [15, 6, "Ammo", 3, 1]
  #Ranged Weapons
  Range_Weapons = {}
  # Range_Weapons[Weapon_ID] = 
  #[Character Set Name, Move Speed, Animation, Ammo, Range,  Mash Time(in seconds), Kick Back(in tiles),Animation Suffix,Number of Animtions of the suffix]
  # Leave kickback 0 if you don't want kick back effect.
  Range_Weapons[17] = ["Arrow", 6, 4, 33, 15, 3, 0, "_bow"]
  Range_Weapons[18] = ["Arrow", 6, 4, 33, 15, 4, 0]
  Range_Weapons[22] = ["Ammo", 6, 4, 33, 15, 3, 0, "_gun"]
  Range_Weapons[33] = ["Ammo", 10, 12, 34, 15, 3, 0]
  Range_Weapons[34] = ["Ammo", 10, 12, 34, 15, 1, 1]
  Range_Weapons[35] = ["Ammo", 10, 12, 34, 15, 5, 4]
  #-------------------------------------------------------------------------
  #Ranged Explosives
  Range_Explode = {}
  # Range_Explode[Skill_ID] = [Range, Move Speed, Character Set Name, Explosive Range, Mash Time(in seconds), Kick Back(in tiles)]
  Range_Explode[8] = [10, 6, "183-Rock02", 5, 3, 2]
  #--------------------------------------------------------------------------
  # Since Melee weapons aren't listed I made this for customazation of melee weapons.
  Melee_Custom = {}
  # if left blank the default mash time will be MASH_TIME(below)
  # No need to use the animation suffix if you don't plan to animate the player's character set.
  # Melee_Custom[Weapon_ID] = [Mash Time(in seconds), Kick Back(in tiles), animation suffix, number of animation of the suffix]
  Melee_Custom[1] = [2, 0, "_melee"]
  Melee_Custom[2] = [10, 1, "_melee",2]
  Melee_Custom[40] = [1]
  #--------------------------------------------------------------------------
  # Since some skills won't be listed(i.e non-ranged) I made this for customazation of melee weapons.
  Skill_Custom = {}
  # if left blank the default mash time will be MASH_TIME(below)
  # No need to use the animation suffix if you don't plan to animate the player's character set.
  # Skill_Custom[Skill_ID] = [Mash Time(in seconds), Kick Back(in tiles), animation suffix, number of animation of the suffix]
  Skill_Custom[1] = [3, 0]
  Skill_Custom[7] = [3, 0]
  Skill_Custom[8] = [3, 0, "_cast",2]
  #-----------------------------------------------------------------------------
  Can_Hurt_Ally = true              # If you have an ally, can you hurt it ?
  #-----------------------------------------------------------------------------
  Death_State_ID = 1                # The DEAD(Knockout) state Id
  Revive      = true                # Try and revive the actor that died?
  Next_Leader = true               # When the leader dies, choose next one in party?
  #-----------------------------------------------------------------------------
  Animation_Divide = 2              # Divide Animations by [number]
  #--------------------------------------------------------------------------
  Default_Mash = 10                 # 10 frames(1 sec)
  #--------------------------------------------------------------------------
  DAMAGE_FONT_NAME = "Arial Black"
  DAMAGE_FONT_SIZE = 22
  # To change the color you need to adjust the numbers below.
  # The numbers reperesnt 3 colors, red, greend and blue. All you have to do is
  # just change the numbers.
  # Color.new(RED,GREEN,BLUE)
  DAMAGE_FONT_COLOR = Color.new(0,0,0)
  #-----------------------------------------------------------------------------
  Wall_Tag = 1                      # The Terrain Tag that makes the tile a WALL.
  Pass_Tag = 2                      # The Terrain tag that makes impassable tiles
                                    # passable for bows/guns and skills.
  #-----------------------------------------------------------------------------
  Dash_Key  = Input::Letters["A"]   # The Dash button
  Sneak_Key = Input::Letters["Z"]   # The Sneak button
  Allow_Dash = true                 # Allow Dash
  Allow_Sneak = true                # Allow Sneak
  Dash_Speed = 5                    # Dash Speed
  Dash_Length = 20                  # The amount of time the player can dash in seconds
  Sneak_Speed = 2                   # Sneak Speed
  Sneak_Length = 20                 # The amount of time the player can Sneak in seconds
  Dash_Animation_Show = false       # Show Dashing Animation? Changes "characterset_name" to 'charaterset_name_dashing'
  Sneak_Animation_Show = false      # Show Sneaking Animation? Changes "characterset_name" to 'charaterset_name_sneaking'
  #-----------------------------------------------------------------------------
  # Assign the ID of states to each variable. Each effect is described. You can
  # add more then one id to each to get the effect you want.
  STUN_EFFECT = [2]      # No movement/atk/skill, and can't use items.
  DAZZLE_EFFECT = [4]    # Makes the screen bright.
  MUTE_EFFECT = [5]      # Can't use skill.
  CONFUSE_EFFECT = [6]   # Controls randomly don't work.
  SLEEP_EFFECT = [7]     # Can't move until you get hit.
  PARALAYZE_EFFECT = [8] # Move slowly, cant attack || use skills.
  CLUMSY_EFFECT = [9,10] # Can't run || sneak.
  DELAY_EFFECT = [11]    # Walk slow, can't run.
  BLIND_EFFECT = [17]    # Make screen darker.
  SPEED_UP = [18]        # Can run without depleting the bar.
  LIGHT_FEET =[19]       # Can sneak without depleting the bar.
  #-----------------------------------------------------------------------------
  States = {}
  # States[STATE_ID] = [DURATION in FRAMES, 0]
  # if Duration is 0 the state will stay there until healed(item, skill). 
  # 10 frames = 1 sec
  States[1] = 0    #Until Healed
  States[2] = 200  #20 seconds
  States[3] = 200  #20 seconds
  States[4] = 200  #20 seconds
  States[5] = 200  #20 seconds
  States[6] = 200  #20 seconds
  States[7] = 200  #20 seconds
  States[8] = 200  #20 seconds
  States[9] = 200  #20 seconds
  States[10] = 200 #20 seconds
  States[17] = 0   #Until Healed
  States[18] = 200 #20 seconds
  States[19] = 200 #20 seconds
  #--------------------------------------------------------------------------
  # Display Level UP?
  DisplayLevelUp = true
  # Level Up Music, leave "" if no music
  LevelUpMusic = ""
  #--------------------------------------------------------------------------
  # Item Drop Display, if true, display.
  ITEM_DROP = true
  #--------------------------------------------------------------------------
  # After the Item is dropped, how long(in frames 1/10th of a second) should the
  # item stay there?
  Item_Duration_Time = 300 # 30 sec.
  #--------------------------------------------------------------------------
  # Items Weapons Armors and Gold Display
  # This is the default item display. If there is no character_set set for specific
  # item and Item_Drop is true, then this character set will be used.
  DEFAULT_ITEM_DISPLAY   = 'Item_Display'
  DEFAULT_WEAPON_DISPLAY = 'Item_Display'
  DEFAULT_ARMOR_DISPLAY  = 'Item_Display'
  # Gold Display
  GOLD_DISPLAY = 'Gold_Display'
  # Items
  ITEMS_DISPLAY = {}
  #        Item ID = 'Character_Set Name'
  ITEMS_DISPLAY[1] = 'Item_Display'
  ITEMS_DISPLAY[2] = 'Item_Display'
  # Weapons
  WEAPONS_DISPLAY = {}
  #        Item ID = 'Character_Set Name'
  WEAPONS_DISPLAY[1] = 'Item_Display'
  WEAPONS_DISPLAY[2] = 'Item_Display'
  # Armor
  ARMORS_DISPLAY = {}
  #        Item ID = 'Character_Set Name'
  ARMORS_DISPLAY[1] = 'Item_Display'
  ARMORS_DISPLAY[2] = 'Item_Display'
  # Hot Key Say
  HotkeySay = "Assigned to key!"
end[code]
[/code]
 

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