View Single Post
  #43  
Unread 02-06-2009, 04:30 PM
SOE-Rothgar SOE-Rothgar is offline
A Griffon
Yes this person is from Daybreak!
 
Join Date: Aug 2007
Server: Unrest
Posts: 208
Default

Yeah, I considered that we could have separate functions for lua commands, and then I decided that it would be much easier to add a new property to UIWidget "UseLuaScript" and if that property is set to true then all functions would be processed using the lua interpreter.

I talked to a coworker who is a big lua fan and has been doing lots of server-side lua work and he was pretty excited about this idea too. He's the type of guy that likes working on little side-projects too, so I'm thinking maybe I'll keep pestering him to do it.

With a lua script engine we'd have true function calls and we could expose a whole lot more of our UI to scripting. It would be much easier to create functions for reading/writing your own data to the new xml file. You'd also get all the built-in functions for lua. It would be nice being able to create local variables that don't turn into widget properties. The lua environment would be implemented on a window basis, so while each event would have its own stack space, you could declare global variables on a window level and they'd persist between function calls. So you wouldnt have to store data in widgets.

Implementing the "UseLuaScript" property would let existing UI's continue using UIScript even down to a widget level.
Reply With Quote