Scripts / Hud script question

Author
Message
Big Dog Game Studios
12
Years of Service
User Offline
Joined: 18th Jun 2012
Location: Port Angeles, WA
Posted: 2nd Mar 2015 20:18 Edited at: 6th Mar 2015 23:01
Hey everyone, I am not looking for a straight up "this is how you do it for me" answer. I am going through the scripts and trying to learn the different aspects of LUA, especially those I will be using in my game. I am working on turning off the HUD altogether because it is not needed. So, I found this in the globals:



Do I switch the "0" to "1" to change the hidehuds to true? Or do I need to script it separately and write it as its own function? Any help and advice of this would be appreciated.
J_C
17
Years of Service
User Offline
Joined: 9th Nov 2007
Location:
Posted: 2nd Mar 2015 20:58
Have you looked at the Game Guru LUA scripting summary and guide... on Steam

From your Steam account page go to Links ( Communtiy Hub )
Scroll down the page and you will see the section Guide : Game Guru Lua scripting..

When you have read this you will know you will have to add the hud commands to a script
as described in the guide... and attach the script to an entity ( remember the entity has to be non static )..

PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Mar 2015 21:31
i agree with checking out the guide but to answer your question you only need this
Quote: "ShowHuds()"
or
Quote: "HideHuds()"
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Big Dog Game Studios
12
Years of Service
User Offline
Joined: 18th Jun 2012
Location: Port Angeles, WA
Posted: 2nd Mar 2015 21:52 Edited at: 6th Mar 2015 23:02
Already been looking through it.. Just working on trying to figure it out on my own as well
Big Dog Game Studios
12
Years of Service
User Offline
Joined: 18th Jun 2012
Location: Port Angeles, WA
Posted: 2nd Mar 2015 22:26 Edited at: 6th Mar 2015 23:02
I appreciate the help guys. I got it to work. For anyone else that may be curious, I set up a trigger zone right over my player start location. I created a script in Notepad with the following:


I found out what my problem was, I was capitalizing the "F" in function... which is a no no in LUA. You can use the above code in a file named hidehud.lua
Big Dog Game Studios
12
Years of Service
User Offline
Joined: 18th Jun 2012
Location: Port Angeles, WA
Posted: 2nd Mar 2015 22:41 Edited at: 6th Mar 2015 23:02
***UPDATE***

Please note that if you use the HideHuds() function you will NOT be able to use the TAB features for changes in the editor. Even if you delete the trigger zone, once the HideHuds() function has been called, they will not appear. You have to reverse it and run the ShowHuds() function in order to call your HUD and TAB Options back.
J_C
17
Years of Service
User Offline
Joined: 9th Nov 2007
Location:
Posted: 3rd Mar 2015 16:49
Thanks big dog ... I did not know that... good spot...
PM

Login to post a reply

Server time is: 2024-12-30 16:36:45
Your offset time is: 2024-12-30 16:36:45