using tables to create health bars
digitalzero
Member, BASIC Posts: 639
So i am using @jamie_c awesome tutorial on using replicate behavior to have a health bar... Only thing is that i want to be able to take away from the table when the boss gets hit with a gun for instance... I know how to do this using attributes but I'm a novice with tables... With attributes it looks like this
If actor overlaps or collides with shot change attribute game.boss health to game.boss health -1...
I hope i amexplaining this correctly... I just don't want to have to save every attribute doing it my old method
Comments
Use the Change Table Behavior. You plug in the row and column and then subtracts from that value.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Another member posted (I can't remember where) if you spawn the health bar either in front of or behind the actor (I can't remember which) you can use the same game level attribute to constrain x and y positions of the health bars for all actors and they work independently.
No one knows why you can do this in Creator and I don't know if it can still be done. Try it and see if it still works. It is much better than tables because there is no lag.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
You might find my demo helpful: http://forums.gamesalad.com/discussion/comment/384027/#Comment_384027.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@Braydon_SFX i can't figure out how to do it... It gives me the value but if i put -1 then i don't want it to go towards tthat.. If the health was 20 i want It to be 19
here you go
Thanks so much!!!!!!!!!!!!!!
Glad to help