Scripting API

Home Scripting API Index


What is a Scripting Language

NoLimits comes with a powerful scripting language. A scripting language is a text based programming language that can be used to extend the application by doing things, the standard user interface does not provide. The difference between a normal programming language and a scripting language is, that normal languages typically transform the code into executable machine or byte code before execution, while a scripting language directly executes the text files with the source code without any previously done translation.

What means API

API stands for Application Programming Interface. It is the set of protocols, interfaces and documentation to access the supported scripting features of the NoLimits application. While developing scripts for NoLimits, you will want to check out these pages, especially the Class Overview with all available interfaces and protocols. These pages provide information about what interface does what.

What can it do

You can create scripts and add them to scene objects, coasters, environments. You can also write plugins for the editor. The editor plugin API is quite small at the moment, it only allows to change terrain height markers. The scripting engine is highly extensible, we will add more features in future versions, when we are able to better understand what features our users want. The full power of the scripting engine comes to life when scripts will be assigned to scene objects, coasters or environments. Every instance of scene object or coaster will have it is own script running. Here is a short list of what you can do: The water splash effect is a good example of what is possible with the scripting engine. It does quite a lot from the above list. It is an NL2SCO scene object that has a script included. At initialization time, the script will detect the location of its scene object (the hint box). It will hide the box, so that it becomes invisible in play mode. It will then detect the nearest coaster track. It will create a track trigger point at the nearest track and will wait for a train to pass by that track trigger. Everytime a train will pass by, it will animated a couple of sub objects from the scene object's 3D model file. Each water effect sprite is a sub object of the model file. The scene object uses custom NL2MAT materials with a sprite effect. The script implements a particle system that is animating the sub objects to fullfill the effect of water splashes.

What does the language provide

The script files are text files that are added to a scene object, coaster or environment and will be executed for every instance of scene object, coaster or environment while running the Play Mode. For scene objects, you need to create a NL2SCO file to add the script to it. For environments, the script needs to be added using the Environment Editor. Scripts can be added to coasters directly from using the coaster tab inside the editor. The scripting language is an object oriented programming language very similar to existing object oriented languages like Java™, C# or C++. You can do all things that you typically can do in these kind of languages. There is also a small set of helper classes that you can use. Here is a short list of language features:

What you need

The script files are text files, so all you need is a text editor of your choice. Also you need to have some advanced programming skills, prefably in an object oriented programming language. If yes, you will be ready to start right away. If not, we recommend to get familar with the Java™ or C# programming languages first, both are closest to the NoLimits scripting language.

Java and Oracle are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.