GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Health bar problems

APPertizingAPPertizing Posts: 12Member
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,751Member, Sous Chef, PRO, Senior Sous-Chef
    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,751Member, Sous Chef, PRO, Senior Sous-Chef
    Accepted Answer
    Demos are always good so...

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

  • tatiangtatiang Posts: 11,751Member, Sous Chef, PRO, Senior Sous-Chef
    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 Posts: 12Member
    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?
This discussion has been closed.