How to make GUI show when..
by Don Weatherby · in Torque Game Engine · 09/25/2006 (5:26 pm) · 2 replies
Hi Im making a inventory from the GUI editor for my game and i wanted to know how would i make it so that when I pressed a certain key lets say " i " for example that my Inventory gui would show when I press "I" in game or even to get my mouse unlocked so I can click the inventory button.
I am thankful for any help thx.
I am thankful for any help thx.
About the author
Torque Owner Unk
1) First have an mouse or keypress event triggered off of some defined input (mouse button down, 'i' key, etc.)
2) The you have what happens during that event. What you do with the binds themselves is completely defined by script. (So anything you can script can be bound to a key.)
Crack Open Your TGB Reference (in the documents folder):
- For mouse events do a search on 'onmouseup'.
- For hiding/showing the gui check out isVisible under 'GuiControl'.
There are tons of online examples/tutorials on this stuff once you know what to search for. =)
GUI can be sort of tough to figure out. I suggest picking up a copy of The Game Programmers Guide To Torque as a reference.
-Unk