How to make a health bar?

kwan_blanchekwan_blanche Member Posts: 4
edited November -1 in Working with GS (Mac)
I've followed the instruction given on the wiki..but it doesn't work..
and what does this mean..
"When your player takes damage, make sure you put in a 'change attribute' behaviour to tell the game that your energy/lives is energy/lives-1"
what do I do with the "change attribute"? and is it for the health bar or the player?

Comments

  • kwan_blanchekwan_blanche Member Posts: 4
    where can i create an game attribute then?
  • ratbumratbum Member Posts: 18
    Go to the panel on the left-hand side, (the inspector), there are two buttons that are sort of joined together, one saying scene, the other saying game.

    Make sure you are on game, then click on the middle tab (Attributes), which is below where it says inspector.

    Click the + at the bottom of the new panel.
  • SpacefaceSpaceface Member Posts: 15
    I'm having the exact same problem.

    My Health bar has a constrain attribute: self.Size.Width To: 100*game.Lives/10

    My actor has a change attribute place under his collide rule. with game.Player lives To. game/lives-1

    When I test my game and colide with an enemy my actor just explodes and the health bar does nothing?

    Is this because I need to move or change the Spawn actor that creates an explosion when it collides with enemy?
  • kwan_blanchekwan_blanche Member Posts: 4
    great i watched your youtube video and it helps alot..
    but the player's life should ends right? and player should be destroyed and disappears and the game should end..then how can i do that?
  • RushDawgRushDawg Member Posts: 86
    Hi there, the link to the video no longer works and I'm having trouble setting this up. Is there somewhere else I can find the video?

    Thanks
  • RushDawgRushDawg Member Posts: 86
    Never mind, I found the video under Tshirtbooth's Youtube account. Thanks again Tshirtbooth!
Sign In or Register to comment.