Author Topic: Scripting HUDs  (Read 1946 times)

0 Members and 1 Guest are viewing this topic.

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.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
I'm pretty sure there's a separate SEXP that can do the standard elements.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 
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 goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Here's a SEXP from BP that switches off a lot of the HUD

Code: [Select]
( 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.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline m!m

  • 211
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?
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline m!m

  • 211
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.