-
Notifications
You must be signed in to change notification settings - Fork 0
Home
scriptor is a powerful scripting language designed to run seamlessly in your game. You can create, compile and execute scripts at runtime.
The syntax is close to gml, with a touch of good old BASIC and a little spice of command shell scripting.
Note
Please note: Scriptor is not MIT Licensed and not Freeware.
A raptor Pro License is required.
-
scriptoris fast. Most scripts run in a few microseconds, you won't notice much performance impact (depends on the complexity of your script though). - Access global and local variables or define private variables within your script.
- Call any function, whether it's a local method, a global function, or even a built-in
gmlfunction. - All major control structures of a language are available:
- Loops:
for,while,do...until - Conditions:
if - Sequences: Even call chains are supported, i.e.
self.struct1.struct2.method(...) - Arrays: Arrays are supported, all the most important gml-array functions are available (
array_push/pop/shift,array_first/last,array_insert/remove...) - Structs: Create any struct, in your script, the owner of the script or even global
- Loops:
- Includes
#macrofunctionality with recursive resolution, just like ingml. - Use
#includeto create global Scriptor modules and include them wherever needed. The engine supports recursive includes. so you may include things, that include other things. -
raptorintegration. Scriptor comes with several raptor modules to make the most importantraptormacros available in your script, like theGAMECONTROLLERorROOMCONTROLLER,GAME_SPEED, even theLogger, etc.
These steps are typically performed during the game's startup (e.g., loading screen).
Each script is bound to an _owner object (which can be a game object or a struct). This _owner is accessible in your script through self.
var scr = new Scriptor(_owner, @"
// Your script code goes here
");
if (!scr.compile())
throw("Some error messsage");
Once your script is compiled, you can run it at any time:
scr.run();Of course, you may modify, or even dynamically create any script code at runtime, and re-compile the script whenever you need to.
scriptor is optimized for run-performance. Compiling a script may take some time, depending on your script, even a whole millisecond or two, so consider compiling only during loading screens. Running the script is very fast then!
Back to Repo ● Wiki Home
Copyright © coldrock.games
- Home
- Scriptor Contents
- Scriptor Configuration
- Notepad⁺⁺ Integration
- Create a Script
- $ Variables
- Call a GML Function
- Scriptor global functions
- #-Commands
- The Scriptor Broker
- Broker Events
- Self-Registering Scripts
- Registering Broker Events
- Scriptor Broker File Format
- Extending Scriptor
- var
- new
- goto
- gosub and return
- return (without gosub)
- call
- reset
- Loops
- Conditionals