Health Bar attach to my Actor
tahlia.kwan@sydstu.catholic.edu.au
Member Posts: 9
How do I attach my health bar to my character?
Because the tutorial i watche showed me how to make the health bar but not attach it to my actor, so that when it moves they move together..
I've tried control camera and that doesn't work-
Comments
Try constraining the health bar to the characters x and y
Here is one way. Uses the Constraining method @KillerPenguinStudios mentions.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I have a health bar demo in the Spare Code thread that does just this. If you can't find it let me know and I can provide you with the link.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Here's that link: http://forums.gamesalad.com/discussion/comment/384027/#Comment_384027.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
And an even simpler (albeit limited) method is to use Display Text with emoji (copied and pasted from http://getemoji.com). See attached.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I might be giving you information that you already have, but I might also be saving you the headaches I had...
If you use the "Constrain Attribute" method, when entering the formula of the constraint, you cannot simply type in the address (i.e. self.Position.X). You must make a selection using the dropdown arrow offered. This simple error cost me a couple of hours and much consternation. (Yes I am used to writing all my code and am suffering through a learning curve with these incredibly user-friendly visual interface programs.)
Hope this insight helps someone...