Nasal scripting language: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
 
(Some more cleanup)
 
(422 intermediate revisions by 21 users not shown)
Line 1: Line 1:
Many applications today support scripting as a means of "gluing" the application together and enabling users to extend functionality of the application. For example, the 3d modeling application Blender implements most of its import and export filters as user contributed Python scripts, which are automatically integrated into the menu system. Many games are also integrating a scripting language to make it easier for modders to add features.
{{Nasal Navigation}}
'''Nasal''' is FlightGear's built-in scripting language. Originally written and developed by Andy Ross for a personal project, it was integrated into FlightGear in November 2003, and has been continuously developed, improved, and refined since then. Over time, it has become probably FlightGear's most powerful, and has been used to create a huge variety of systems, ranging from [[wildfire simulation|wildfires]] to [[Control Display Unit]]s.


FlightGear has a scripting language called NASAL. You can find out more about it at the NASAL website.
Within FlightGear, Nasal supports the reading and writing of internal [[Property Tree|properties]], accessing internal data via extension functions, creating GUI dialogs and much, much more. Please see the right navigation bar to get additional information.


http://www.plausible.org/nasal
[[File:Highlight parse.png]]<!--


Elements of the graphical user interface, aircraft instruments and performance can be scripted.
<syntaxhighlight lang="nasal">
# to be saved in $FG_ROOT/Nasal/hello.nas
print("Hello World!");
</syntaxhighlight>


How to play sounds using NASAL script?
[[File:Vim-nasal-syntax-highlighting.png]]


The same way one would do animations using Nasal;
{{Nasal Efforts}}


Adjust properties in Nasal (they may be "private" properties in your own
-->[[Category:Nasal]]
subtree of the property list, say /tmp/<aircraft>) and let the sound
configuration file act on those properties.
(from flightgear-devel)

Latest revision as of 19:17, 28 August 2016

Nasal is FlightGear's built-in scripting language. Originally written and developed by Andy Ross for a personal project, it was integrated into FlightGear in November 2003, and has been continuously developed, improved, and refined since then. Over time, it has become probably FlightGear's most powerful, and has been used to create a huge variety of systems, ranging from wildfires to Control Display Units.

Within FlightGear, Nasal supports the reading and writing of internal properties, accessing internal data via extension functions, creating GUI dialogs and much, much more. Please see the right navigation bar to get additional information.

Highlight parse.png