-
Notifications
You must be signed in to change notification settings - Fork 1
Scripting
Sami Ylönen edited this page Dec 6, 2015
·
26 revisions
In the Scripts page, click "Add script".
Add a name for the script, and add source file(s) by clicking "Add source".
For each source file you add, write a file name for it.
You can reorder the scripts when you've added all you need. Execution order matters, place libraries first.
Press save.
You can now find the script entry, folder and js files from DATAROOT\Scripts.
The .js file you intend to be your main "executable" needs to have these 2 methdods
function execute() {
return true;
}
function executionCallback() {
}
execute() will be called by the engine and expects you to return true or false, true for script done and false if you want to rerun the script.
executionCallback() is called each time execute() is finished