home *** CD-ROM | disk | FTP | other *** search
/ ftp.team17.com 2014 / 2014.05.ftp.team17.com.tar / ftp.team17.com / pub / t17 / demos / pc / PhoenixDemo_En.exe / Scripts / alias / testalias.txt < prev   
Text File  |  1999-10-14  |  10KB  |  366 lines

  1. // WAIT waits for a specified time and executes the instructions given.
  2. // $1=time
  3. // $2-$9 = instructions to execute mid-loop
  4.  
  5. @WAIT::(int{Time in milliseconds},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
  6. Timer($1)
  7. Label(&1)
  8. $2
  9. $3
  10. $4
  11. $5
  12. $6
  13. $7
  14. $8
  15. $9
  16. If(Timer): Goto(&1)
  17. ENDALIAS
  18.  
  19. // SETVAR is a shortcut for setting variables.
  20. // $1 = variable name
  21. // $1 = value
  22.  
  23. @SETVAR::(string{Variable name},int{Variable value})
  24. Do(S_SETVAR["$1",$2])
  25. ENDALIAS
  26.  
  27. @ADDVAR::(string{Variable name},int{Variable value})
  28. Do(S_ADDVAR["$1",$2])
  29. ENDALIAS
  30.  
  31. //CHECKGOTO executes a GOTO if a variable has a certain value.
  32. // $1 = variable name
  33. // $2 = value to match
  34. // $3 = where to GOTO
  35.  
  36. @CHECKGOTO::(string{Variable name},int{Value to match},label{Label to go to})
  37. If(S_VAR["$1",$2]): Goto($3)
  38. ENDALIAS
  39.  
  40. //WAITVAR waits for a variable to become a certain value.
  41. // $1 = variable name
  42. // $2 = value
  43. // $3-9 instructions to execute while waiting.
  44.  
  45. @WAITVAR::(string{Variable name},int{Value to wait for},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
  46. Label(&1)
  47. If(S_VAR["$1",$2]): Goto(&2)
  48. $3
  49. $4
  50. $5
  51. $6
  52. $7
  53. $8
  54. $9
  55. Goto(&1)
  56. Label(&2)
  57. ENDALIAS
  58.  
  59. //FLYCAM Flies the camera from its current position to a specified target object/null. Exits when
  60. // camera reaches target.
  61. // $1 = target to head for
  62. // $2 = maximum speed
  63. // $3 = how close the camera has to get to the target to trigger.
  64. // $4-9 = instructions to execute while waiting.
  65.  
  66. @FLYCAM::(ship{Target to head for},int{Maximum speed},int{Range},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
  67. Label(&1)
  68. Thrust Camera($1.POS:$2)
  69. $4
  70. $5
  71. $6
  72. $7
  73. $8
  74. $9
  75. If(S_CLOSETOGETHER["CAM","$1",$3]): Goto(&2)
  76. Goto(&1)
  77. Label(&2)
  78. ENDALIAS
  79.  
  80. //FLYCAMTIMED Flies the camera from its current position to a specified target object/null. Exits when
  81. // camera reaches target or timer expires.
  82. // $1 = target to head for
  83. // $2 = maximum speed
  84. // $3 = how close the camera has to get to the target to trigger.
  85. // $4-9 = instructions to execute while waiting.
  86.  
  87. @FLYCAMTIMED::(ship{Target to head for},int{Maximum speed},int{Range},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
  88. Label(&1)
  89. Thrust Camera($1.POS:$2)
  90. $4
  91. $5
  92. $6
  93. $7
  94. $8
  95. $9
  96. If(S_CLOSETOGETHER["CAM","$1",$3]): Goto(&2)
  97. If(Timer): Goto(&1)
  98. Label(&2)
  99. ENDALIAS
  100.  
  101. //FLYPATH2 Flies to two targets in sequence using FLYCAM
  102. // $1 = target 1
  103. // $2 = target 2
  104. // $3 = speed
  105. // $4 = trigger distance
  106. // $5 = instruction to execute while en-route.
  107.  
  108. @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})
  109. @FLYCAM{$1|$3|$4|$5}
  110. @FLYCAM{$2|$3|$4|$5}
  111. ENDALIAS
  112.  
  113. //FLYPATH3 Flies to three targets in sequence using FLYCAM
  114. // $1 = target 1
  115. // $2 = target 2
  116. // $3 = target 3
  117. // $4 = speed
  118. // $5 = trigger distance
  119. // $6 = instruction to execute while en-route.
  120.  
  121. @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})
  122. @FLYCAM{$1|$4|$5|$6}
  123. @FLYCAM{$2|$4|$5|$6}
  124. @FLYCAM{$3|$4|$5|$6}
  125. ENDALIAS
  126.  
  127. //FLYPATH4 Flies to four targets in sequence using FLYCAM
  128. // $1 = target 1
  129. // $2 = target 2
  130. // $3 = target 3
  131. // $4 = target 4
  132. // $5 = speed
  133. // $6 = trigger distance
  134. // $7 = instruction to execute while en-route.
  135.  
  136.  
  137. @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})
  138. @FLYCAM{$1|$5|$6|$7}
  139. @FLYCAM{$2|$5|$6|$7}
  140. @FLYCAM{$3|$5|$6|$7}
  141. @FLYCAM{$4|$5|$6|$7}
  142. ENDALIAS
  143.  
  144. //JUDDER defines a camara judder...
  145. // $1 = start judder amount
  146. // $2 = time between start and end.
  147. // $3 = end judder amount
  148.  
  149. @JUDDER::(int{Initial judder amount},int{Duration in milliseconds},int{Final judder amount})
  150. Do(S_JUDDER[$1,$2,$3])
  151. ENDALIAS
  152.  
  153. @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)})
  154. Do(S_SCREENFADE[$1,$2,$3,$4,$5,$6])
  155. ENDALIAS
  156.  
  157. //FOLLOWPATH tells a ship to fly to a target null, and waits until it gets there.
  158. //$1 = ship to make fly
  159. //$2 = target for ship to fly to
  160. //$3 = trigger distance to target
  161. //$4 - $9 = instructions to execute during wait
  162.  
  163. @FOLLOWPATH::(ship{Vessel to control},ship{Target},int{Range},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction},[inst]{Instruction})
  164. Tactic(Flyto,$1,$2)
  165. Label(&1)
  166. $4
  167. $5
  168. $6
  169. $7
  170. $8
  171. $9
  172. If(s_FARAPART["$1","$2",$3]): Goto(&1)
  173. ENDALIAS
  174.  
  175.  
  176. // SETRAND sets the specified variable to a random value.
  177. // $1 = variable name
  178. // After this instruction, the variable will contain a number betwee 1 and $2, for example:
  179. // SETRAND{blah|4}  afterwards blah will contain 1,2,3 or 4.
  180.  
  181. @SETRAND::(string{Variable name),int{Maximum value})
  182. Do(S_RANDVAR["$1",$2])
  183. ENDALIAS
  184.  
  185. // SETNUMPARAM Sets a specified parameter of a certain ship to a certain numerical value
  186. // $1 = ship name
  187. // $2 = param name
  188. // $3 = value
  189.  
  190. @SETNUMPARAM::(ship{Ship whose variable you wish to set},string{Parameter name},float{Value to set})
  191. Do(S_NUMPARAM["$1","$2",$3])
  192. ENDALIAS
  193.  
  194. //RESETNUMPARAM Resets a parameter of a ship to the value given in the scene parameters.
  195.  
  196. @RESETNUMPARAM::(ship{Ship whose variable you wish to set},string{Parameter name})
  197. Do(S_RESETNUMPARAM["$1","$2"])
  198. ENDALIAS
  199.  
  200. // SETSTRPARAM Sets a specified parameter of a certain ship to a certain string
  201. // $1 = ship name
  202. // $2 = param name
  203. // $3 = string
  204.  
  205. @SETSTRPARAM::(ship{Ship whose variable you wish to set},string{Parameter name},string{String to set})
  206. Do(S_STRPARAM["$1","$2","$3"])
  207. ENDALIAS
  208.  
  209. // CHECKSTRPARAM Checks a specified parameter of a certain ship against a certain string
  210. // $1 = ship name
  211. // $2 = param name
  212. // $3 = string
  213.  
  214. @CHECKSTRPARAM::(ship{Ship whose variable you wish to check},string{Parameter name},string{String to compare},[inst]{Instruction to execute if successful})
  215. If(S_CHECKSTRPARAM["$1","$2","$3"]): $4
  216. ENDALIAS
  217.  
  218. @MESSAGEWAIT::(string{Phrase},int{Time to wait},[inst]{Instruction to execute while waiting})
  219. Message($1)
  220. @WAIT{$2|$3}
  221. ENDALIAS
  222.  
  223. @MOVESHIP::(ship{Ship to move},ship{Destination})
  224. Do(S_MOVESHIP["$1","$2"])
  225. ENDALIAS
  226.  
  227. @MOVESHIPNOANG::(ship{Ship to move},ship{Destination})
  228. Do(S_MOVESHIPNOANG["$1","$2"])
  229. ENDALIAS
  230.  
  231. @CAMSHOT::(ship{Camera position},ship{Ship to track},string{Variable to wait on},string{Value to wait for})
  232. Position Camera($1.POS)
  233. Target Camera($2.POS)
  234. @WAITVAR{$3|$4|Position Camera($1.POS)|Track Camera($2.POS)}
  235. ENDALIAS
  236.  
  237. @LOOKPAST::(ship{Ship to look past},ship{Ship to track},float{Elevation},string{Variable to wait on},int{Value to wait for})
  238. Position Camera($1.POS+$1.POS-$2.POS+[0,$3,0])
  239. Target Camera($2.POS)
  240. @WAITVAR{$4|$5|Position Camera($1.POS+$1.POS-$2.POS+[0,$3,0])|Track Camera($2.POS)}
  241. ENDALIAS
  242.  
  243. @WAITCLOSE::(ship{Ship 1},ship{Ship 2},int{Trigger distance})
  244. Label(&1)
  245. If(S_FARAPART["$1","$2",$3]): Goto(&1)
  246. ENDALIAS
  247.  
  248. @WAITFAR::(ship{Ship 1},ship{Ship 2},int{Trigger distance})
  249. Label(&1)
  250. If(S_CLOSETOGETHER["$1","$2",$3]): Goto(&1)
  251. ENDALIAS
  252.  
  253. @CAMTOSHIPSECTOR::(ship{Ship whose sector you wish to see})
  254. Do(S_CAMTOSHIPSECTOR["$1"])
  255. ENDALIAS
  256.  
  257. @CAMTOSECTOR::(int{Sector to move the camera to})
  258. Do(S_CAMTOSECTOR[$1])
  259. ENDALIAS
  260.  
  261. @SETSHIPSECTOR::(ship{Ship to change},int{Sector to enter})
  262. Do(S_SETSHIPSECTOR["$1",$2])
  263. ENDALIAS
  264.  
  265. @SETSQUADSECTOR::(squad{Squad to change},int{Sector to enter})
  266. Do(S_SETSQUADSECTOR["$1",$2])
  267. ENDALIAS
  268.  
  269. @SOUNDON::()
  270. Do(S_SOUNDON[])
  271. ENDALIAS
  272.  
  273. @END::()
  274. Label(&1)
  275. Goto(&1)
  276. ENDALIAS
  277.  
  278. @CHECKSQUADTAGGED::(squad{Squad to check},label{Label to jump to if tagged})
  279. If(S_SQUADGOTFLAG["$1","TAGGED"]): Goto($2)
  280. ENDALIAS
  281.  
  282. @CHECKSQUADLESSTHAN::(squad{Squad to check},int{number of ships},label{label to jump to if less than})
  283. If(S_SQUADLESSTHAN["$1",$2]): Goto($3)
  284. ENDALIAS
  285.  
  286. @NEXTMISSION::(string{Mission Name})
  287. Do(S_NEXTMISSION["$1"])
  288. ENDALIAS
  289.  
  290. @QUITATTRACT::()
  291. If(S_CHECKATTRACT[]): Quit
  292. ENDALIAS
  293.  
  294. @STARTRENDER::()
  295. Goto(&1)
  296. Label(&1)
  297. Start Render
  298. ENDALIAS
  299.  
  300. @STOPRENDER::()
  301. Stop Render
  302. ENDALIAS
  303.  
  304. @PANAROUNDLEFT::(ship{Starting position},ship{Aim target},int{Speed},int{Time})
  305. Position Camera($1.POS)
  306. Target Camera($2.POS)
  307. Timer($4)
  308. Label(&1)
  309. Thrust Camera(CAM.POS+CAM.ANG*[-10000,0,0]:$3)
  310. Track Camera($2.POS)
  311. If(Timer): Goto(&1)
  312. ENDALIAS
  313.  
  314. @PANAROUNDRIGHT::(ship{Starting position},ship{Aim target},int{Speed},int{Time})
  315. Position Camera($1.POS)
  316. Target Camera($2.POS)
  317. Timer($4)
  318. Label(&1)
  319. Thrust Camera(CAM.POS+CAM.ANG*[10000,0,0]:$3)
  320. Track Camera($2.POS)
  321. If(Timer): Goto(&1)
  322. ENDALIAS
  323.  
  324. @PANAROUNDRIGHTNOTARG::(ship{Starting position},ship{Aim target},int{Speed},int{Time})
  325. Position Camera($1.POS)
  326. Timer($4)
  327. Label(&1)
  328. Thrust Camera(CAM.POS+CAM.ANG*[10000,0,0]:$3)
  329. Track Camera($2.POS)
  330. If(Timer): Goto(&1)
  331. ENDALIAS
  332.  
  333. @PANAROUNDLEFTNOTARG::(ship{Starting position},ship{Aim target},int{Speed},int{Time})
  334. Position Camera($1.POS)
  335. Timer($4)
  336. Label(&1)
  337. Thrust Camera(CAM.POS+CAM.ANG*[-10000,0,0]:$3)
  338. Track Camera($2.POS)
  339. If(Timer): Goto(&1)
  340. ENDALIAS
  341.  
  342. @LOG::(string{String to write to log file})
  343. Do(S_LOGOUT["$1"])
  344. ENDALIAS
  345.  
  346. @WARNPLAYER::(string{Squad name of player})
  347. Label(&1)
  348. If(S_GOODBOY[500]): Goto(&1)
  349.  
  350. Message($1,BADBOY1)
  351.  
  352. Label(&2)
  353. If(S_GOODBOY[1000]): Goto(&2)
  354.  
  355. Message($1,BADBOY2)
  356.  
  357. Label(&3)
  358. If(S_GOODBOY[1500]): Goto(&3)
  359.  
  360. Message($1,BADBOY3)
  361.  
  362. Label(&4)
  363. If(S_GOODBOY[2000]): Goto(&4)
  364.  
  365. Message($1,BADBOY4)
  366. ENDALIAS