shrinking healthbar to the right

digitalzerodigitalzero Member, BASIC Posts: 639
basically what im trying to do is shrink my healthbar to the right... i have looked at tshirtbooths tutorial of creating a healthbad but thats only having it shrink to the left... is there anyone out there that knows how to shrink the healthbar to the right?

Comments

  • MantoManto Member Posts: 796
    edited February 2013
    Change the constrain x behavior
    from:
    PlayerX+self.size.Width/2
    to:
    PlayerX-self.size.Width/2
  • digitalzerodigitalzero Member, BASIC Posts: 639
    @manto1 i did that and now my healthbar is goign to the way right of the scene... heres what i have placed thats making it do that for some reason

    constrain attribute
    self.position.x to 10-(self.size.width/2)
  • digitalzerodigitalzero Member, BASIC Posts: 639
    i mean the far left... sorry
  • ashtmjashtmj Member, PRO Posts: 405
    Just tested this and it worked.


    Constrain Attribute: self.Position.X to (where ever you want it to land on screen, I did 500) +self.Size.Width /2- self.Size.Width

    then Constrain width to your HP integer

    hope that helps! :)

  • digitalzerodigitalzero Member, BASIC Posts: 639
    thanks so much it worked! :)
Sign In or Register to comment.