Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > CopperCube Open discussion
Health bar??

crackyourspeaker
Registered User
Quote
2016-05-31 00:43:33

Can i make a simple health bar for my player??


Artizrek
Guest
Quote
2016-05-31 11:01:16

Yea. Check for there, maybe you will find solution. http://www.ambiera.com/coppercube/doc/cnt_actions.html
Also you need scripting skills
Here is also a tutorial made for: https://www.youtube.com/watch?v=KMoQfO6zbH4&index=6&list=PLq6aUvz66jtfPn6CLgixPElEMO1z6Ihxo


just_in_case
Moderator
Quote
2016-05-31 17:59:59

You dont need any script to do that... you can do it just by using variables... if a variable has some value do something...
variable player.health
player is name of your player scene node...

For example if player.health = 100 then change texture or animate a texture .. choose your health bar texture with full health...

You can do the same for if player.health= 50 or 75 or 0 or anything else....just change the texture of health bar according to value of health variable...

That's all..

editthere is a hash sign before player.health variable.... I don't know why am unable to use it in forum...post .. you just can't use hash in your post...


crackyourspeaker
Registered User
Quote
2016-05-31 23:05:01

Awesome thanks guys


doomtucan
Registered User
Quote
2019-08-22 21:06:48

okay so how do i show this on a 2d overlay?


doomtucan
Registered User
Quote
2019-08-23 18:41:57

I figured it out


Ashden124
Guest
Quote
2021-03-20 22:39:16

so i know a potential way you could do it. have the health bar be a 3d child object for the main camera, and then in the player settings have action on hit and then have it change the texture for a 3d child object. NOTE: enemies would have to do 50% damage


smnmhmdy
Registered User
Quote
2021-03-21 15:02:36

I think you might find this useful https://www.ambiera.com/forum.ph...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact