how do i make my health bar go from right to left instead of shrinking it
wendell_heather@yahoo.com
Member Posts: 36
i have hearts as my health bar and i cant figure out how to keep it from just shrinking into the middle
i have it constrained right now as
max(0,min(game.health *.05,40)))
self.size.width -25
also when i click to heal the health it lets the points keep adding up so if somebody were to keep adding health it would be unlimited how do i keep the health points from going over 430
Comments
Use the Replicate Behavior like I did in the tutorial below. Just use a Heart image instead of my 1 pixel line.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
idk why when i follow your video my image repeats across the screen
it replicates the number of the health i have in the game as the image so ifmy health is 100 it replicates it 100 times i dont mind setting my health to 1 so that it only replicates the image 1 time but then i run into the problem of not being able to subract .25 because it wont read it
The tutorial above uses a Health Attribute that is an Integer. Integers do not allow decimal numbers.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page