Generic Level meter
by Howard Dortch · in Torque Game Engine · 12/03/2005 (11:16 am) · 4 replies
I looked through the engine and didn't see any generic meters. Healthbar type is what im looking for. I have an object that only operates if it has power and uses power when it operates. I want a level meter like the healthbar to show the power of the device. Is there one available or should I write one?
#2
If you look closely at the stock healthbar, you'll see there is an option called "displayEnergy".
Check the box and click "apply".
Done.
12/05/2005 (9:18 am)
Howard,If you look closely at the stock healthbar, you'll see there is an option called "displayEnergy".
Check the box and click "apply".
Done.
#3
Kirby I wanted to tie the meter to an object like a rocket pack or something not a player.
12/05/2005 (11:54 am)
Thanks Manoel I guess I will just do that.Kirby I wanted to tie the meter to an object like a rocket pack or something not a player.
#4
Obviously, I can't sit down and write a script that would this (not at my home PC) but I don't see why it wouldn't work. You'd just be getting the energy value of %obj as assinged to an object by the objects' script.
Should work about the same.
12/05/2005 (12:12 pm)
Hmmm...Obviously, I can't sit down and write a script that would this (not at my home PC) but I don't see why it wouldn't work. You'd just be getting the energy value of %obj as assinged to an object by the objects' script.
Should work about the same.
Associate Manoel Neto
Default Studio Name
Making a copy of the health bar class, renaming it, and adding a method to set it's value by hand, instead of it reading the shape's health could work.
Or you could simply use the health property to show the power of the device, and use the health bar to display that.