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
a scenario script
s in SpaceEngine. Before continuing, it is recommended
to that you read this manual:
Introduction
SPACEENGINE CONSOLE AND *.SE FILES
SpaceEngine 0.981 introduced
a new type of file
s – *.se.
It is – a scenario script file
s,
which contains
a code
which that is could be executed by SpaceEngine.
A great example of what scenarios are capable
to is 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
could can be executed in
the ‘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, provided in the curved braces block (i.e.
that those commands are actually tags). Example:
CodeGoto
{
Time 5.5
Dist 25000
}
Additional parameters
could 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.