This page describes the new functionality introduced in the upcoming SpaceEngine 0.981, which has not been released yet.
This manual describes how to make [s]
a[/s] scenario script[s]
s[/s] in SpaceEngine. Before continuing, it is recommended [s]
to[/s]
that you read this manual:
Introduction
SPACEENGINE CONSOLE AND *.SE FILES
SpaceEngine 0.981 introduced
a new type of file[s]
s[/s] – *.se.
[s]It is[/s] – a scenario script file[s]
s[/s],
which contains [s]
a[/s] code
[s]which[/s] that is [s]could be[/s] executed by SpaceEngine.
A great example of what scenarios are capable [s]
to is[/s]
are the Tutorials, introduced in 0.981.
The default location for *.se files is data/scripts/ or addons/*/scripts/ folder. You can run *.se file
s from SpaceEngine by opening
the console ([~] key by default) and typing this command:
Code
run filename
If the file filename.se exists in the mentioned folders, it will be executed. Another way to run *.se files is
by passing them to SpaceEngine’s executable through command line argument
s. The best way to do that is
to associate
the *.se extension with SpaceEngine.exe in your system. In that case
, double-clicking on the file will launch SpaceEngine and order it to execute the scenario script. If SpaceEngine is already running, this running instance will execute the script.
All commands [s]
could[/s]
can be executed in [s]
the[/s] ‘direct mode’ by typing them in the console, or execut
ing them from a *.se script file. Commands and most of their parameters are not case-sensitive, but string constants such as names of GUI widgets and names of triggers are case-sensitive.
Some commands can have (or even must have) an additional parameter
[s]s[/s], provided in the curved braces block (i.e.
[s]that[/s] those commands are actually tags). Example:
CodeGoto
{
Time 5.5
Dist 25000
}
Additional parameters [s]
could[/s]
can be typed in a single row:
CodeGoto { Time 5.5 Dist 25000 } Using the single-row style sometimes makes the script code more compact and easy to read and understand.
All commands are split in a groups according to their functions. Unroll the blacks below to read details.