How does one create a HUD in the game?
by Judy L Tyrer · in General Discussion · 04/21/2009 (5:03 am) · 2 replies
Not able to find any documentation on how to create a simple HUD to put in game. I would like to create a HUD to show a few things in game:
-health
-faction/status
-property owned
-number of specific item(s) in inventory
Or any number of attributes and/or abilities (not necessarily the ones listed above). Also giving the player the option to select what is shown on the HUD.
Any constructive advice, links or suggestions is always very welcome.
Thank you in advance
-health
-faction/status
-property owned
-number of specific item(s) in inventory
Or any number of attributes and/or abilities (not necessarily the ones listed above). Also giving the player the option to select what is shown on the HUD.
Any constructive advice, links or suggestions is always very welcome.
Thank you in advance
#2
-health: simply hook up health bar ctrl and graphic. (GuiHealthBarHud -- example in playGUI.gui)
-faction/status: a little bit trickier. You would need a meeds of determining what faction/team a player belonged to and sending that result to a display. You would also have to determine just how often or when the HUD would be updated.*
-property owned: same procedure for faction/status.*
-inventory: there are a lot of displayed inventory resources. I can't say I have a preferred one but look at how several of them work and roll your own.
-attributes/skills: Jaimi McEntire's GuiStatusCtrl resource does that wonderfully. Nice and simply, best of all: it's easy to use.
-selecting what is shown: Give the Container for each control a unique name. Have a pop-up check box list that lists all controls you may want to display/hide. Use the checkbox to set the individual controls to setVisible(true) or setVisible(false).
*NOTE: proper updating of HUD controls will probably require an understanding of how Client Commands work.
04/21/2009 (10:54 am)
Some of the information contained here is better than the bare info contained in those docs.-health: simply hook up health bar ctrl and graphic. (GuiHealthBarHud -- example in playGUI.gui)
-faction/status: a little bit trickier. You would need a meeds of determining what faction/team a player belonged to and sending that result to a display. You would also have to determine just how often or when the HUD would be updated.*
-property owned: same procedure for faction/status.*
-inventory: there are a lot of displayed inventory resources. I can't say I have a preferred one but look at how several of them work and roll your own.
-attributes/skills: Jaimi McEntire's GuiStatusCtrl resource does that wonderfully. Nice and simply, best of all: it's easy to use.
-selecting what is shown: Give the Container for each control a unique name. Have a pop-up check box list that lists all controls you may want to display/hide. Use the checkbox to set the individual controls to setVisible(true) or setVisible(false).
*NOTE: proper updating of HUD controls will probably require an understanding of how Client Commands work.
Torque 3D Owner Ted Southard