Game Development Community

Two Quick Questions

by Chris Byars · in Torque Game Engine · 03/28/2005 (6:34 am) · 8 replies

Shields.
How would I set up, as the health bar works, a shields bar? So that any damage would go to the shield before taking off the health of the player? And, once that is set, how could I have the shield regenerate over time as well?

Also, how do I add/change the available resolution sizes that a client can click to choose at the main menu?

Thanks in advance.

#1
03/28/2005 (6:38 am)
Have you looked at the already existing examples that you got when you downloaded the SDK?
#2
03/28/2005 (6:43 am)
The available resolution modes are reported by the video card the executable is run on. You don't have direct control over them (although I would imagine with some digging you could limit them if you chose).
#3
03/28/2005 (6:43 am)
Yup. That starter.fps "energy" bar does nothing like the matter.
I don't see a shield-type thing in there either.

Thanks, Stephen. I've seen that the game Orbz only lets you pick between 800x600 and 1024x768. I'll see if I can figure out what the heck I'm doing in that code.
#4
03/28/2005 (10:50 am)
However, the shield is something that puzzles me.

To set up a "healthbar" like object that takes damage before the regular "healthbar" takes damage. o_O
#5
03/30/2005 (1:10 am)
What if you made the "sheild" bar display $health - 100 percent%

I.E. if you have 150% health thats 100% health + 50% sheilds, etc
#6
03/30/2005 (1:11 am)
I believe ShapeBase already has shields integrated.
#7
03/30/2005 (6:30 am)
Mike, what do you mean?
#8
03/30/2005 (7:51 pm)
He means search the SDK code for the word "shield" and you will find 16 references spread through 3 different files that will explain everything about shields in TGE.