// WAIT waits for a specified time and executes the instructions given.
// $1=time
// $2-$9 = instructions to execute mid-loop
@WAIT::(int{Time in milliseconds},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
//CHECKGOTO executes a GOTO if a variable has a certain value.
// $1 = variable name
// $2 = value to match
// $3 = where to GOTO
@CHECKGOTO::(string{Variable name},int{Value to match},label{Label to go to})
If(S_VAR["$1",$2]): Goto($3)
ENDALIAS
//WAITVAR waits for a variable to become a certain value.
// $1 = variable name
// $2 = value
// $3-9 instructions to execute while waiting.
@WAITVAR::(string{Variable name},int{Value to wait for},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
Label(&1)
If(S_VAR["$1",$2]): Goto(&2)
$3
$4
$5
$6
$7
$8
$9
Goto(&1)
Label(&2)
ENDALIAS
//FLYCAM Flies the camera from its current position to a specified target object/null. Exits when
// camera reaches target.
// $1 = target to head for
// $2 = maximum speed
// $3 = how close the camera has to get to the target to trigger.
// $4-9 = instructions to execute while waiting.
@FLYCAM::(ship{Target to head for},int{Maximum speed},int{Range},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
Label(&1)
Thrust Camera($1.POS:$2)
$4
$5
$6
$7
$8
$9
If(S_CLOSETOGETHER["CAM","$1",$3]): Goto(&2)
Goto(&1)
Label(&2)
ENDALIAS
//FLYCAMTIMED Flies the camera from its current position to a specified target object/null. Exits when
// camera reaches target or timer expires.
// $1 = target to head for
// $2 = maximum speed
// $3 = how close the camera has to get to the target to trigger.
// $4-9 = instructions to execute while waiting.
@FLYCAMTIMED::(ship{Target to head for},int{Maximum speed},int{Range},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
Label(&1)
Thrust Camera($1.POS:$2)
$4
$5
$6
$7
$8
$9
If(S_CLOSETOGETHER["CAM","$1",$3]): Goto(&2)
If(Timer): Goto(&1)
Label(&2)
ENDALIAS
//FLYPATH2 Flies to two targets in sequence using FLYCAM
// $1 = target 1
// $2 = target 2
// $3 = speed
// $4 = trigger distance
// $5 = instruction to execute while en-route.
@FLYPATH2::(ship{Target to head for},ship{Second target to head for},int{Maximum speed},int{Range},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
@FLYCAM{$1|$3|$4|$5}
@FLYCAM{$2|$3|$4|$5}
ENDALIAS
//FLYPATH3 Flies to three targets in sequence using FLYCAM
// $1 = target 1
// $2 = target 2
// $3 = target 3
// $4 = speed
// $5 = trigger distance
// $6 = instruction to execute while en-route.
@FLYPATH3::(ship{Target to head for},ship{Second target to head for},ship{Third target to head for},int{Maximum speed},int{Range},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
@FLYCAM{$1|$4|$5|$6}
@FLYCAM{$2|$4|$5|$6}
@FLYCAM{$3|$4|$5|$6}
ENDALIAS
//FLYPATH4 Flies to four targets in sequence using FLYCAM
// $1 = target 1
// $2 = target 2
// $3 = target 3
// $4 = target 4
// $5 = speed
// $6 = trigger distance
// $7 = instruction to execute while en-route.
@FLYPATH4::(ship{Target to head for},ship{Second target to head for},ship{Third target to head for},ship{Fourth target to head for},int{Maximum speed},int{Range},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
@FLYCAM{$1|$5|$6|$7}
@FLYCAM{$2|$5|$6|$7}
@FLYCAM{$3|$5|$6|$7}
@FLYCAM{$4|$5|$6|$7}
ENDALIAS
//JUDDER defines a camara judder...
// $1 = start judder amount
// $2 = time between start and end.
// $3 = end judder amount
@JUDDER::(int{Initial judder amount},int{Duration in milliseconds},int{Final judder amount})
Do(S_JUDDER[$1,$2,$3])
ENDALIAS
@SCREENFADE::(int{Initial opaque value (0-255)},int{Duration in milliseconds},int{Final opaque value(0-255)},int{Red value (0-255)},int{Green value (0-255)},int{Blue value (0-255)})
Do(S_SCREENFADE[$1,$2,$3,$4,$5,$6])
ENDALIAS
//FOLLOWPATH tells a ship to fly to a target null, and waits until it gets there.
//$1 = ship to make fly
//$2 = target for ship to fly to
//$3 = trigger distance to target
//$4 - $9 = instructions to execute during wait
@FOLLOWPATH::(ship{Vessel to control},ship{Target},int{Range},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
Tactic(Flyto,$1,$2)
Label(&1)
$4
$5
$6
$7
$8
$9
If(s_FARAPART["$1","$2",$3]): Goto(&1)
ENDALIAS
// SETRAND sets the specified variable to a random value.
// $1 = variable name
// After this instruction, the variable will contain a number betwee 1 and $2, for example:
// SETRAND{blah|4} afterwards blah will contain 1,2,3 or 4.
// SETNUMPARAM Sets a specified parameter of a certain ship to a certain numerical value
// $1 = ship name
// $2 = param name
// $3 = value
@SETNUMPARAM::(ship{Ship whose variable you wish to set},string{Parameter name},float{Value to set})
Do(S_NUMPARAM["$1","$2",$3])
ENDALIAS
//RESETNUMPARAM Resets a parameter of a ship to the value given in the scene parameters.
@RESETNUMPARAM::(ship{Ship whose variable you wish to set},string{Parameter name})
Do(S_RESETNUMPARAM["$1","$2"])
ENDALIAS
// SETSTRPARAM Sets a specified parameter of a certain ship to a certain string
// $1 = ship name
// $2 = param name
// $3 = string
@SETSTRPARAM::(ship{Ship whose variable you wish to set},string{Parameter name},string{String to set})
Do(S_STRPARAM["$1","$2","$3"])
ENDALIAS
// CHECKSTRPARAM Checks a specified parameter of a certain ship against a certain string
// $1 = ship name
// $2 = param name
// $3 = string
@CHECKSTRPARAM::(ship{Ship whose variable you wish to check},string{Parameter name},string{String to compare},[inst]{Instruction to execute if successful})
If(S_CHECKSTRPARAM["$1","$2","$3"]): $4
ENDALIAS
@MESSAGEWAIT::(string{Phrase},int{Time to wait},[inst]{Instruction to execute while waiting})
Message($1)
@WAIT{$2|$3}
ENDALIAS
@MOVESHIP::(ship{Ship to move},ship{Destination})
Do(S_MOVESHIP["$1","$2"])
ENDALIAS
@MOVESHIPNOANG::(ship{Ship to move},ship{Destination})
Do(S_MOVESHIPNOANG["$1","$2"])
ENDALIAS
@CAMSHOT::(ship{Camera position},ship{Ship to track},string{Variable to wait on},string{Value to wait for})