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_De.exe / Scripts / alias / testalias.txt < prev   
Text File  |  1999-10-27  |  10KB  |  370 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. @SETINTPARAM::(ship{Ship whose variable you wish to set},string{Parameter name},int{Value to set})
  195. Do(S_NUMPARAM["$1","$2",$3])
  196. ENDALIAS
  197.  
  198. //RESETNUMPARAM Resets a parameter of a ship to the value given in the scene parameters.
  199.  
  200. @RESETNUMPARAM::(ship{Ship whose variable you wish to set},string{Parameter name})
  201. Do(S_RESETNUMPARAM["$1","$2"])
  202. ENDALIAS
  203.  
  204. // SETSTRPARAM Sets a specified parameter of a certain ship to a certain string
  205. // $1 = ship name
  206. // $2 = param name
  207. // $3 = string
  208.  
  209. @SETSTRPARAM::(ship{Ship whose variable you wish to set},string{Parameter name},string{String to set})
  210. Do(S_STRPARAM["$1","$2","$3"])
  211. ENDALIAS
  212.  
  213. // CHECKSTRPARAM Checks a specified parameter of a certain ship against a certain string
  214. // $1 = ship name
  215. // $2 = param name
  216. // $3 = string
  217.  
  218. @CHECKSTRPARAM::(ship{Ship whose variable you wish to check},string{Parameter name},string{String to compare},[inst]{Instruction to execute if successful})
  219. If(S_CHECKSTRPARAM["$1","$2","$3"]): $4
  220. ENDALIAS
  221.  
  222. @MESSAGEWAIT::(string{Phrase},int{Time to wait},[inst]{Instruction to execute while waiting})
  223. Message($1)
  224. @WAIT{$2|$3}
  225. ENDALIAS
  226.  
  227. @MOVESHIP::(ship{Ship to move},ship{Destination})
  228. Do(S_MOVESHIP["$1","$2"])
  229. ENDALIAS
  230.  
  231. @MOVESHIPNOANG::(ship{Ship to move},ship{Destination})
  232. Do(S_MOVESHIPNOANG["$1","$2"])
  233. ENDALIAS
  234.  
  235. @CAMSHOT::(ship{Camera position},ship{Ship to track},string{Variable to wait on},string{Value to wait for})
  236. Position Camera($1.POS)
  237. Target Camera($2.POS)
  238. @WAITVAR{$3|$4|Position Camera($1.POS)|Track Camera($2.POS)}
  239. ENDALIAS
  240.  
  241. @LOOKPAST::(ship{Ship to look past},ship{Ship to track},float{Elevation},string{Variable to wait on},int{Value to wait for})
  242. Position Camera($1.POS+$1.POS-$2.POS+[0,$3,0])
  243. Target Camera($2.POS)
  244. @WAITVAR{$4|$5|Position Camera($1.POS+$1.POS-$2.POS+[0,$3,0])|Track Camera($2.POS)}
  245. ENDALIAS
  246.  
  247. @WAITCLOSE::(ship{Ship 1},ship{Ship 2},int{Trigger distance})
  248. Label(&1)
  249. If(S_FARAPART["$1","$2",$3]): Goto(&1)
  250. ENDALIAS
  251.  
  252. @WAITFAR::(ship{Ship 1},ship{Ship 2},int{Trigger distance})
  253. Label(&1)
  254. If(S_CLOSETOGETHER["$1","$2",$3]): Goto(&1)
  255. ENDALIAS
  256.  
  257. @CAMTOSHIPSECTOR::(ship{Ship whose sector you wish to see})
  258. Do(S_CAMTOSHIPSECTOR["$1"])
  259. ENDALIAS
  260.  
  261. @CAMTOSECTOR::(int{Sector to move the camera to})
  262. Do(S_CAMTOSECTOR[$1])
  263. ENDALIAS
  264.  
  265. @SETSHIPSECTOR::(ship{Ship to change},int{Sector to enter})
  266. Do(S_SETSHIPSECTOR["$1",$2])
  267. ENDALIAS
  268.  
  269. @SETSQUADSECTOR::(squad{Squad to change},int{Sector to enter})
  270. Do(S_SETSQUADSECTOR["$1",$2])
  271. ENDALIAS
  272.  
  273. @SOUNDON::()
  274. Do(S_SOUNDON[])
  275. ENDALIAS
  276.  
  277. @END::()
  278. Label(&1)
  279. Goto(&1)
  280. ENDALIAS
  281.  
  282. @CHECKSQUADTAGGED::(squad{Squad to check},label{Label to jump to if tagged})
  283. If(S_SQUADGOTFLAG["$1","TAGGED"]): Goto($2)
  284. ENDALIAS
  285.  
  286. @CHECKSQUADLESSTHAN::(squad{Squad to check},int{number of ships},label{label to jump to if less than})
  287. If(S_SQUADLESSTHAN["$1",$2]): Goto($3)
  288. ENDALIAS
  289.  
  290. @NEXTMISSION::(string{Mission Name})
  291. Do(S_NEXTMISSION["$1"])
  292. ENDALIAS
  293.  
  294. @QUITATTRACT::()
  295. If(S_CHECKATTRACT[]): Quit
  296. ENDALIAS
  297.  
  298. @STARTRENDER::()
  299. Goto(&1)
  300. Label(&1)
  301. Start Render
  302. ENDALIAS
  303.  
  304. @STOPRENDER::()
  305. Stop Render
  306. ENDALIAS
  307.  
  308. @PANAROUNDLEFT::(ship{Starting position},ship{Aim target},int{Speed},int{Time})
  309. Position Camera($1.POS)
  310. Target Camera($2.POS)
  311. Timer($4)
  312. Label(&1)
  313. Thrust Camera(CAM.POS+CAM.ANG*[-10000,0,0]:$3)
  314. Track Camera($2.POS)
  315. If(Timer): Goto(&1)
  316. ENDALIAS
  317.  
  318. @PANAROUNDRIGHT::(ship{Starting position},ship{Aim target},int{Speed},int{Time})
  319. Position Camera($1.POS)
  320. Target Camera($2.POS)
  321. Timer($4)
  322. Label(&1)
  323. Thrust Camera(CAM.POS+CAM.ANG*[10000,0,0]:$3)
  324. Track Camera($2.POS)
  325. If(Timer): Goto(&1)
  326. ENDALIAS
  327.  
  328. @PANAROUNDRIGHTNOTARG::(ship{Starting position},ship{Aim target},int{Speed},int{Time})
  329. Position Camera($1.POS)
  330. Timer($4)
  331. Label(&1)
  332. Thrust Camera(CAM.POS+CAM.ANG*[10000,0,0]:$3)
  333. Track Camera($2.POS)
  334. If(Timer): Goto(&1)
  335. ENDALIAS
  336.  
  337. @PANAROUNDLEFTNOTARG::(ship{Starting position},ship{Aim target},int{Speed},int{Time})
  338. Position Camera($1.POS)
  339. Timer($4)
  340. Label(&1)
  341. Thrust Camera(CAM.POS+CAM.ANG*[-10000,0,0]:$3)
  342. Track Camera($2.POS)
  343. If(Timer): Goto(&1)
  344. ENDALIAS
  345.  
  346. @LOG::(string{String to write to log file})
  347. Do(S_LOGOUT["$1"])
  348. ENDALIAS
  349.  
  350. @WARNPLAYER::(string{Squad name of player})
  351. Label(&1)
  352. If(S_GOODBOY[500]): Goto(&1)
  353.  
  354. Message($1,BADBOY1)
  355.  
  356. Label(&2)
  357. If(S_GOODBOY[1000]): Goto(&2)
  358.  
  359. Message($1,BADBOY2)
  360.  
  361. Label(&3)
  362. If(S_GOODBOY[1500]): Goto(&3)
  363.  
  364. Message($1,BADBOY3)
  365.  
  366. Label(&4)
  367. If(S_GOODBOY[2000]): Goto(&4)
  368.  
  369. Message($1,BADBOY4)
  370. ENDALIAS