// 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}) Timer($1) Label(&1) $2 $3 $4 $5 $6 $7 $8 $9 If(Timer): Goto(&1) ENDALIAS // SETVAR is a shortcut for setting variables. // $1 = variable name // $1 = value @SETVAR::(string{Variable name},int{Variable value}) Do(S_SETVAR["$1",$2]) ENDALIAS @ADDVAR::(string{Variable name},int{Variable value}) Do(S_ADDVAR["$1",$2]) ENDALIAS //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. @SETRAND::(string{Variable name),int{Maximum value}) Do(S_RANDVAR["$1",$2]) ENDALIAS // 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}) Position Camera($1.POS) Target Camera($2.POS) @WAITVAR{$3|$4|Position Camera($1.POS)|Track Camera($2.POS)} ENDALIAS @LOOKPAST::(ship{Ship to look past},ship{Ship to track},float{Elevation},string{Variable to wait on},int{Value to wait for}) Position Camera($1.POS+$1.POS-$2.POS+[0,$3,0]) Target Camera($2.POS) @WAITVAR{$4|$5|Position Camera($1.POS+$1.POS-$2.POS+[0,$3,0])|Track Camera($2.POS)} ENDALIAS @WAITCLOSE::(ship{Ship 1},ship{Ship 2},int{Trigger distance}) Label(&1) If(S_FARAPART["$1","$2",$3]): Goto(&1) ENDALIAS @WAITFAR::(ship{Ship 1},ship{Ship 2},int{Trigger distance}) Label(&1) If(S_CLOSETOGETHER["$1","$2",$3]): Goto(&1) ENDALIAS @CAMTOSHIPSECTOR::(ship{Ship whose sector you wish to see}) Do(S_CAMTOSHIPSECTOR["$1"]) ENDALIAS @CAMTOSECTOR::(int{Sector to move the camera to}) Do(S_CAMTOSECTOR[$1]) ENDALIAS @SETSHIPSECTOR::(ship{Ship to change},int{Sector to enter}) Do(S_SETSHIPSECTOR["$1",$2]) ENDALIAS @SETSQUADSECTOR::(squad{Squad to change},int{Sector to enter}) Do(S_SETSQUADSECTOR["$1",$2]) ENDALIAS @SOUNDON::() Do(S_SOUNDON[]) ENDALIAS @END::() Label(&1) Goto(&1) ENDALIAS @CHECKSQUADTAGGED::(squad{Squad to check},label{Label to jump to if tagged}) If(S_SQUADGOTFLAG["$1","TAGGED"]): Goto($2) ENDALIAS @CHECKSQUADLESSTHAN::(squad{Squad to check},int{number of ships},label{label to jump to if less than}) If(S_SQUADLESSTHAN["$1",$2]): Goto($3) ENDALIAS @NEXTMISSION::(string{Mission Name}) Do(S_NEXTMISSION["$1"]) ENDALIAS @QUITATTRACT::() If(S_CHECKATTRACT[]): Quit ENDALIAS @STARTRENDER::() Goto(&1) Label(&1) Start Render ENDALIAS @STOPRENDER::() Stop Render ENDALIAS @PANAROUNDLEFT::(ship{Starting position},ship{Aim target},int{Speed},int{Time}) Position Camera($1.POS) Target Camera($2.POS) Timer($4) Label(&1) Thrust Camera(CAM.POS+CAM.ANG*[-10000,0,0]:$3) Track Camera($2.POS) If(Timer): Goto(&1) ENDALIAS @PANAROUNDRIGHT::(ship{Starting position},ship{Aim target},int{Speed},int{Time}) Position Camera($1.POS) Target Camera($2.POS) Timer($4) Label(&1) Thrust Camera(CAM.POS+CAM.ANG*[10000,0,0]:$3) Track Camera($2.POS) If(Timer): Goto(&1) ENDALIAS @PANAROUNDRIGHTNOTARG::(ship{Starting position},ship{Aim target},int{Speed},int{Time}) Position Camera($1.POS) Timer($4) Label(&1) Thrust Camera(CAM.POS+CAM.ANG*[10000,0,0]:$3) Track Camera($2.POS) If(Timer): Goto(&1) ENDALIAS @PANAROUNDLEFTNOTARG::(ship{Starting position},ship{Aim target},int{Speed},int{Time}) Position Camera($1.POS) Timer($4) Label(&1) Thrust Camera(CAM.POS+CAM.ANG*[-10000,0,0]:$3) Track Camera($2.POS) If(Timer): Goto(&1) ENDALIAS @LOG::(string{String to write to log file}) Do(S_LOGOUT["$1"]) ENDALIAS @WARNPLAYER::(string{Squad name of player}) Label(&1) If(S_GOODBOY[500]): Goto(&1) Message($1,BADBOY1) Label(&2) If(S_GOODBOY[1000]): Goto(&2) Message($1,BADBOY2) Label(&3) If(S_GOODBOY[1500]): Goto(&3) Message($1,BADBOY3) Label(&4) If(S_GOODBOY[2000]): Goto(&4) Message($1,BADBOY4) ENDALIAS