How Can I Get Health Bar Working Correctly?

Discussion in 'How Can I...?' started by ramjetsy7, Mar 5, 2018.

  1. ramjetsy7

    ramjetsy7 Boxer

    Joined:
    Mar 3, 2017
    Messages:
    36
    Likes Received:
    8
    Hi, I'm Paul, first post. Sorry if it's been answered elsewhere, I can't find it..

    So I've got a health bar set up using a custom font. I lose 1 health every time the character hits certain platforms. I gain 1 health when character hits a powerup. The character starts with 10 health (0-9 in font). Health increases or decreases correctly, and game finishes at 0 health, all good, but what can I do to stop health increasing beyond 10?

    I mean, if, for example, I have 2 health and hit 10 powerups, I end up with 12 health and messed up font characters (only single digits seem to work). How to contain health to max 10?

    Thanks in advance.

    PS, health bar set up using this buildbox tut:
     
  2. niketanbalar21

    niketanbalar21 Boxer

    Joined:
    Apr 6, 2018
    Messages:
    31
    Likes Received:
    3
    please give heart shape font style
     
  3. niketanbalar21

    niketanbalar21 Boxer

    Joined:
    Apr 6, 2018
    Messages:
    31
    Likes Received:
    3
    i have a one more problem show your video and set all thing but when character health over to go game over scene then tap restart button is not work
     
    johnnydakoxx likes this.
  4. SpoonCrysis

    SpoonCrysis Avid Boxer

    Joined:
    Aug 10, 2018
    Messages:
    175
    Likes Received:
    26
    I have having an issue that I sent to support already. I followed the same video and he doesn't tell you how to get the RESTART button to work at game over because it doesn't reset the health bar and the game never resets it just goes to game over straight away.
     
  5. niketanbalar21

    niketanbalar21 Boxer

    Joined:
    Apr 6, 2018
    Messages:
    31
    Likes Received:
    3
    there is solution, u have to game ui to set event observer and event type has session, u have to set total right?
    show blow screen shot
     

    Attached Files:

  6. SpoonCrysis

    SpoonCrysis Avid Boxer

    Joined:
    Aug 10, 2018
    Messages:
    175
    Likes Received:
    26
    Thank YOU!!! I changed it to Session points and it worked no issues!!
    They should probity say this in there youtube video they did for health bar, in the video they TELL you to use TOTAL POINTS and not Session points!!

    but thanks for that works perfect :)
     
  7. SpoonCrysis

    SpoonCrysis Avid Boxer

    Joined:
    Aug 10, 2018
    Messages:
    175
    Likes Received:
    26
    is there also a way to cap the health bar?

    eg I have coins that add to the health bar but I don't want it to ad more to the health bar if they already have a full health is there a way to make it not add more health when health bar is full?
     
  8. niketanbalar21

    niketanbalar21 Boxer

    Joined:
    Apr 6, 2018
    Messages:
    31
    Likes Received:
    3
    i don't know , but there is add more parts in font style i think maybe work!
     
  9. SpoonCrysis

    SpoonCrysis Avid Boxer

    Joined:
    Aug 10, 2018
    Messages:
    175
    Likes Received:
    26
    yep I know I can do that but I don't want the player to have endless health because there are alot of health points in the game.

    So I was thinking if they have full health then when they get a health coin it will just give them coins and not health points.
     
  10. niketanbalar21

    niketanbalar21 Boxer

    Joined:
    Apr 6, 2018
    Messages:
    31
    Likes Received:
    3
    thats possible?
     
  11. SpoonCrysis

    SpoonCrysis Avid Boxer

    Joined:
    Aug 10, 2018
    Messages:
    175
    Likes Received:
    26
    ok I have health bar working in my game no issues, I have a coins score as well. The problem I have is that you can't post coin score types to leaderboards in buildbox it just doesnt' let you. So you have to use either distance or points.

    I can't use distance because the game never moves its stationary.
    So I would need to use a points collection system since the games objects its to avoid objects and collect coin.

    now because I have a healthbar I can't use the Point Type.
    So my options is to remove the health bar, and use points type for when coins are collected. OR not have leaderboards because coins can't be posted to leaderboards.

    does any one know if they are going to fix this problem in the future?
     

Share This Page