Author Topic: Lua and the HUD  (Read 1255 times)

0 Members and 1 Guest are viewing this topic.

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Is it possible to use lua scripting to add new guages to the HUD without having to recreate the HUD entirely in lua?

I don't know if it's my crappy scripting or the way lua works, but attempting to add a single guage earlier resulted in a completely blank hud and no new guage... so I'm assuming I screwed the guage up, but I'm, also wondering if, by implementing any file called hud.lua, it completely overrides FS basic hud or not?
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Yes it is possible to create new gauges without overriding old ones. Just dont use the +override option
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Lua should be completely defined by scripting.tbl. That is, if you add a file called hud.lua as your only change, it shouldn't do anything. In order to make it work properly, you should have to use the scripting hook like so:
Code: [Select]
#Global Hooks
$HUD: [[hud.lua]]
#End

As long as +Override: isn't specified or is false, the retail HUD should still appear. Note that if you're just going to have Override by false all the time, you might as well not specify it. It's faster that way.
-C

  

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Just added event/directive support to lua. Now you can change a directive or keypress text to something else, mid-mission. :D
-C