The following Lua orders are regularly used in the Script module:
Methods are activated with ":".
object:method(...);
Properties are accessed with ".".
object.property;
Variable = ValueVariables are defined by such assignments. For many operations in the script module, you can choose any name as variable and assign elements of the 3S module to that name. For example:
cell=structure:findcell("cell1");
In this example, the cell with the name cell1 in the 3S Generator is from now on referred to as cell in the script. For some methods, you can add a the Boolean value true or false.
Operator | Description |
---|---|
== | Equal |
~= | Not Equal |
< | Less Than |
<= | Less Than or Equal |
> | Greater Than |
>= | Greater Than or Equal |
Operator | Description |
---|---|
+, -, *, / | Basic arithmetic operations |
∧ | Exponent |
and, or, not | Boolean operations |
if condition then block end
if condition then block1 else block2 end
if condition then block1 elseif condition2 then block2 else block3 end
for variable = start, end, jump distance do block end
while condition do block end
repeat block until condition
Abort: break