FYI: I've now added Nasal support for scenery objects to my copy of sg & fg. This can be used for 'intelligent' objects -- special lighting features, specific lighthouse signals, things that couldn't be done with animations alone. The code is run as soon as the tile loader decided to load the model. It can use listeners and timers and so run as long as it wishes. If the object is removed from memory, then a variable is changed in the object's namespace, so that the code can stop itself. An optional destructor part can be used for further cleanup (remove listeners etc.)
The required changes for sg & fg are minimal, but because of the nearing release I better send the patches for review after the release. See below for an example. m. <?xml version="1.0"?> <PropertyList> <path>helipad.ac</path> <nasal> <script> f = func { if (!valid) { return } print("Hello, I'm the helipad!"); settimer(f, 5); } f(); </script> <script> <!-- optional destructor --> print("Bye, bye!") </script> </nasal> <animation> <type>noshadow</type> <object-name>helipad</object-name> </animation> </PropertyList> ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel