Hard Light Productions Forums
Modding, Mission Design, and Coding => The Scripting Workshop => Topic started by: Scooby_Doo on May 10, 2013, 01:27:53 am
-
Does anyone know how to hid/show standard hud elements? I see there's a sexp for custom gauges, but that doesn't seem to work for standard ones. And theres some lua entries, I can get some info from them, but it seems to be read only.
-
I'm pretty sure there's a separate SEXP that can do the standard elements.
-
Use the hud-activate-gauge-type SEXP with the name of the standard element (like "Target monitor" or "Auto target") and true/false for activation/deactivation. Scripting can't really do a lot of HUD modification besides drawing things.
-
Here's a SEXP from BP that switches off a lot of the HUD
( when-argument
( every-of
"Damage"
"Wingman status"
"Countermeasures"
"Directives"
"Weapons"
"Comm menu"
"Player shield"
"Target shield"
"Kills"
"Weapon energy"
"Offscreen indicator"
"Center reticle"
"Lead indicator"
"Threat indicator"
"Target direction"
"Orientation"
"Afterburner energy"
"Throttle"
)
( true )
( hud-activate-gauge-type
"<argument>"
( false )
)
)
Note that the SEXP you want to use here is hud-activate-gauge-type as Admiral MS said.
-
Ahh that works, I tried that earlier but it appears Radar isn't one of the gauges that can be hidden. :blah:
Also before I get too far, you can run sexp's via scripting? Think I saw it done somewheres.
-
You can use the runESXP and evealuateSEXP functions to do that. You just have to use '!' instead of '"' for strings.
-
Well that was easy, but is radar missing or does it go by another name?
-
I checked the code and there are three radar related entries: Radar, Radar orb and Radar BSG. You should be on the safe site when you just deactivate all those types which also covers the case that the user has 3D radar enabled.