Make the following real or integer Game Attributes: `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.
It would follow the X and Y coordinate, but not the rotation. So, it would always be "underneath" the actor. If you want to rotate the bar around the actor as well, it would require you to create the health bar larger than the actor and pivot around the center of the actor.
Then Constrain the Attribute of the Health Bar Rotation Angle to the Main Character's Rotation Angle.
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/