TGB - Curved Life Bar
by Sikes8402 · in Torque Game Builder · 10/12/2010 (5:39 am) · 0 replies
I saw some threads earlier, but I lost them on how to do this, although I couldn't get those to work.
What I have is a circular HUD which on one side the upper corner has a quarter of the circle as the health bar and I need it to shrink accordingly to the loss of health. Using the code
setSize(player.health SPC "10"); I get the effect of the bar shrinking as if its a horizontal bar, and obviously I could get it shrink vertically if I changed it, but how do I do both to keep it portional and just look like its going along the curve of the circle? If that's clearly stated, I am not the best describing things in words.
One solution suggest cutting the image up by going into cell and mounting it to a scene object and writing a routine to make the cells visible or invisible. The other seemed the best it suggested using a fxImageMapDatablock2D, but when I called this the setRepeat() and setsize functions were giving errors. Any thoughts. Thanks in advance
What I have is a circular HUD which on one side the upper corner has a quarter of the circle as the health bar and I need it to shrink accordingly to the loss of health. Using the code
setSize(player.health SPC "10"); I get the effect of the bar shrinking as if its a horizontal bar, and obviously I could get it shrink vertically if I changed it, but how do I do both to keep it portional and just look like its going along the curve of the circle? If that's clearly stated, I am not the best describing things in words.
One solution suggest cutting the image up by going into cell and mounting it to a scene object and writing a routine to make the cells visible or invisible. The other seemed the best it suggested using a fxImageMapDatablock2D, but when I called this the setRepeat() and setsize functions were giving errors. Any thoughts. Thanks in advance