• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

health and damage

  1. PeXi81

    Hunger timer

    Hello! I´ve created objPlayer and in Create Event is hunger = 100; How can I make this hunger to decrease 20 in every two minutes? So it is kind of timer so you have to find food or you're gonna die. There is hamburgers and other food and I have given them hunger +=10 so I know how this works...
  2. B

    Question - IDE Lives and Health

    I'm making a game where my little guy runs into bombs and loses a life. But if he runs into a potion he will gain 1 life. Every time he runs into a bomb the life counter will just return to 3, instead of 2. It always resets back to 3. But it will add more lives when he gets the potions, it won't...
  3. AbdatyK

    Object not Working as Sensor

    Hello, I'm relatively new to GameMaker so I'm trying to follow along a youtube tutorial by HeartBeast (found here). I'm aware that he's using an outdated version of GameMaker but I've been able to get by using the manual to fill in the gaps. What I'm stuck on is the damage object that is...
  4. K

    Health going down by 41 instead of 1?

    I'm creating a simple game where if a carobj collides with barrel1obj then the health decreases by 1 and correlates to the health bar. The health bar is correlating properly, but the problem is the health is decreasing by 41 every time the collision event occurs. Completely lost as to why...
  5. E

    GameMaker Replacing value damage with variable damage of player

    Hey Forum Like normally you can make an enemy loss by just saying variable name hp - value - 20 ....However, what I want is instead of writing -20 as a value, can you also simply say subtract from hp as much as the players variable in create event? I have attached two images so you can...
  6. M

    collision problem

    I'm having problems with my collisions, I want to subract 1 from the hp every time the monster hits the target until Nasu_obj destroys itself. I've made a collision event with my monster_obj: --hpm; in the creation code: hpm = 3; and in my step: if hpm = 0 {...
  7. G

    Game Mechanics Alternative to Hit Points

    hey yall. i was wondering if anyone had any references to games that don't have a numerical HP system but something else. in my game, ive been playing around with the idea of having "health" determined by body condition instead of a single unified number. attacks that have pierce armor/clothing...
  8. A

    GML All children of a parent share the same variables..? [SOLVED]

    I have a variable called hp. It's on the obj_slime create event. The slime is also parented to par_enemy. The problem is that, I have an attacker, and I don't wanna copy huge chunks of code for every single enemy in the game. So I created a parent for all enemies, and the when the attacker...
  9. C

    1 object losing hp instead of all

    Hi, im new into gamemaker studio so my code may look pretty awful. I have made a tower object as enemy, but I made the tower from object oTower and oTowerGun where oTowerGun has in his step event an image_angle with point_direction on the player and a oTower that just stand under the oTowerGun...
  10. M

    defence calculation help

    So currently im working on a top down rpg, i have an inventory system set up to where my character can equip hats, clothes shoes and a shield. that all works fine and dandy and the code for calculating defense is working fine. i have one small issue though. when calculating enemy damage if the...
  11. T

    Health and Damage

    I'm not sure how exactly yo do it, I've watched tutorials but they don't seem to help, I've tried setting health -1 relative to the amount of health given (3) but it kills the player and the enemy , which is set to destroy on contact with the player. I've also tried creating an object that moves...
Top