hey guy, i look for gui health bar to show it on top of my OBJ in side the game … what should i do ?!
What are you using to fire? I suggest you checkout the Documentation of the FPS.
http://unity3d.com/support/resources/tutorials/fpstutorial
I got stuck on that when i started out. If you have any other questions feel free to ask me!
Have I helped you? If you then please ask if you want to donate to you ![]()
Hey jamesterjim,
Here is an example of how a simple hp could be made from scripting.
var playerHP = 200.0;
function OnGUI () {
guiTexture.pixelInset = Rect (0, 0, playerHP, 3);
}
Put it on a GUI texture.
As for the gui texture itself you need to put a texture in the texture slot, this could be a white 1x1 pixel. For the color you just pick what ever u like it to be ![]()
Its really simple as you see, but it works…
ilzaer
Woah! Nice ![]()
but it’s just gui… i wanna active deactive and show it right on the location that the object is…
RTS-style GUI indicators attached to individual game objects: