Health bar problems

APPertizingAPPertizing Member Posts: 12
Can someone, anyone pleeease explain to my why my health bar is shrinking in total size and not from right to left like in the tutorial? I have followed the tutorial to the letter even down to my health bar size 200x 20 and still no luck! this is really doing my head in now!

Best Answers

  • tatiangtatiang Posts: 11,949
    edited August 2012 Accepted Answer
    There are two ways to do a health bar: replicate a small actor (e.g. 10 x 10) a certain number of times based on an attribute such as game.health (index), or constrain the width of a large actor (e.g. 200 x 20) to a multiple of that attribute. The trick is that you have to also constrain the x position (if the bar is horizontal) of the actor so that it doesn't appear to shrink from the middle.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Posts: 11,949
    Accepted Answer
    Demos are always good so...

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Posts: 11,949
    Accepted Answer
    If you'd like, I can take a look at your rules and see what's causing the problem. Feel free to send me a message with a link to your project file or to post it here.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • APPertizingAPPertizing Member Posts: 12
    Thanks tatiang, I did constrain the x position just like in t-shirt booths tutorial but my image would not shrink from both sides to the middle, it was shrinking from all 4 sides at once. I tried your method from start to finish and now my health bar doesnt even show on the screen?
Sign In or Register to comment.