Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Nuke on October 07, 2006, 03:58:01 am

Title: attention scripters: new goodies to play with!
Post by: Nuke on October 07, 2006, 03:58:01 am
i just got a pm from wmcoolmon. he wants me to pass on the word that a new im guessing experimental scripting build to test new features. im still drooling over the scripting.htm file so il just post the message. new build included.

http://fs2source.warpcore.org/exes/latest/C10012006.zip

I haven't finished the overhaul of teh scripting system, but it's workable right now. Feel free to pass it on to Wanderer and anyone else working with scripting. The build also probably contains some odds and ends changes that I haven't documented here, but made when I encountered a bug or something.

Here's a little blurb I wrote on what's changed.

Quote
The main improvement is on the scripting system. I've spent many hours basically rewriting the lowlevel code into something far more capable and far neater than the original incarnation. Of course, virtually none of this is evident from a non-coder perspective. (I'm torn between wondering whether I wasted my time, or satisfaction that I did the job well enough in the first place that I didn't have to completely rewrite everything, and it's still mostly as functional as the old version. :sigh:/:D)

Key changes are:
  • When a function that returns a handle fails, an invalid handle is returned, rather than a nil value. Handles can be checked using the isValid() function; this will also take into account a ship dying et cetera.
  • Most of the get*By* and getNum* functions have been replaced with arrays and the length (#) operator. eg: mn.Ships[1], mn.Ships["Alpha 1"], #mn.Ships
  • Debugging information may actually be useful and give the line number of the error, rather than just *****ing at you. (*****ing functionality remains fully functional)
  • Some of the names have been changed; eg "Sound/sd" is now "Audio/ad", in preparation for music functions.

like i said im still going over the scripting.html file and i see alot of stuff i like. seems theres alot of physics vars now accessible. the scriptable submodel animation stuff seems to be in here too. im still tying to come up with things to do. some of the stuff i wanted like player controlled turrets and working cockpit controls seem possible under this build. ive not tried yet but im still trying to understand all the changes. lets all go at it and get wmc some feedback :D
Title: Re: attention scripters: new goodies to play with!
Post by: Wanderer on October 07, 2006, 06:16:25 am
Seems like WMC has been busy again :D. Great work
Title: Re: attention scripters: new goodies to play with!
Post by: DaBrain on October 07, 2006, 08:25:51 am
I just had to add LUA script support to the feature list on the german Freespace article on wikipedia. :)