How do I make a Health Bar follow my actor?
FungoEntertainment
Member Posts: 36
Basicly, I made a health bar and I want it to constantly be under my actor wherever the actor goes. Can someone please help?
Comments
`Main Character X`
`Main Character Y`
In the Main Character Actor:
`
Constrain Attribute: game.Main Character X = self.Position.X
Constrain Attribute: game.Main Character Y = self.Position.y
`
In the Health Bar Actor:
`
Constrain Attribute: self.Position.X = game.Main Character X
Constrain Attribute: self.Position.Y = game.Main Character Y - 15
`
You can adjust the value 15 accordingly if it's too high or low below the character.
Then Constrain the Attribute of the Health Bar Rotation Angle to the Main Character's Rotation Angle.
Here's a visual for you: http://www.flickr.com/photos/beyondthetech/4497242464/