Use of Damage and Health In Object

Discussion in 'How Can I...?' started by dhawal_tamakuwala, Nov 3, 2015.

  1. dhawal_tamakuwala

    dhawal_tamakuwala Avid Boxer

    Joined:
    Oct 5, 2015
    Messages:
    120
    Likes Received:
    46
    Hi Guys,

    I don't able to understand how the health and Damage works in buildbox?

    Can any please guide me on that.
     
  2. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Let's say you have an Enemy object with Health 2 and a Character Bullet with Damage 1. You have to hit the enemy twice before it dies... Same if your Enemy has Heath 1 and your Bullet is on 0.5, you still need to hit that enemy twice before that dies.

    However, you do not seem to have the ability to set the Character Health (which would be nice in my opinion but maybe you can get away with that problem by attaching Objects to your Character)
     
    gracewhite9363 likes this.
  3. kodagames

    kodagames Avid Boxer

    Joined:
    Oct 11, 2015
    Messages:
    294
    Likes Received:
    115
    Question on the topic:
    The bullet would have to hit the enemy twice before its destroyed, is there a way to make it so that when the first bullet hits, the enemy would have its alpha change or a way to create an indication of the enemy taking damage?

    I thought of using the bullets defeat animation but what if its a different enemy?
    Thanks to anyone who can share their process, tips tricks or other :D
     
  4. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Unless someone comes out with a better idea you can place several enemy objects on top of each others, the top most has the collision shape left most and the bottom right most. So each time the bullet hits the left most enemy object, it dies, revealing the other enemy object below that. Not sure how it affects performance and if the physics engine will always collide with the desired enemy object but worth a shot (heh, worth a shot :) )
     
    Last edited: Jan 29, 2016
    kodagames and dhawal_tamakuwala like this.
  5. kodagames

    kodagames Avid Boxer

    Joined:
    Oct 11, 2015
    Messages:
    294
    Likes Received:
    115
    Thanks @trudnai I'll give it a shot ;) and see how it works out :)
     
  6. JustWatchApps

    JustWatchApps Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    315
    Likes Received:
    145
    I have attached a link to an OLD video that shows a method of having a 'health bar' - seems a little clunky, but is worth watching for concepts.
    Hope it helps!
     
    dhawal_tamakuwala likes this.

Share This Page