Advertisement
Guest User

Untitled

a guest
Oct 6th, 2010
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.49 KB | None | 0 0
  1. // sample animation script
  2. //
  3. //
  4. // commands:
  5. // Animate <panel name> <variable> <target value> <interpolator> <start time> <duration>
  6. // variables:
  7. // FgColor
  8. // BgColor
  9. // Position
  10. // Size
  11. // Blur (hud panels only)
  12. // TextColor (hud panels only)
  13. // Ammo2Color (hud panels only)
  14. // Alpha (hud weapon selection only)
  15. // SelectionAlpha (hud weapon selection only)
  16. // TextScan (hud weapon selection only)
  17. //
  18. // interpolator:
  19. // Linear
  20. // Accel - starts moving slow, ends fast
  21. // Deaccel - starts moving fast, ends slow
  22. // Spline - simple ease in/out curve
  23. // Pulse - < freq > over the duration, the value is pulsed (cosine) freq times ending at the dest value (assuming freq is integral)
  24. // Flicker - < randomness factor 0.0 to 1.0 > over duration, each frame if random # is less than factor, use end value, otherwise use prev value
  25. //
  26. // RunEvent <event name> <start time>
  27. // starts another even running at the specified time
  28. //
  29. // StopEvent <event name> <start time>
  30. // stops another event that is current running at the specified time
  31. //
  32. // StopAnimation <panel name> <variable> <start time>
  33. // stops all animations refering to the specified variable in the specified panel
  34. //
  35. // StopPanelAnimations <panel name> <start time>
  36. // stops all active animations operating on the specified panel
  37. //
  38. // SetFont <panel name> <fontparameter> <fontname from scheme> <set time>
  39. //
  40. // SetTexture <panel name> <textureidname> <texturefilename> <set time>
  41. //
  42. // SetString <panel name> <string varname> <stringvalue> <set time>
  43.  
  44. event LevelInit
  45. {
  46. }
  47.  
  48. event OpenWeaponSelectionMenu
  49. {
  50. StopEvent CloseWeaponSelectionMenu 0.0
  51. StopEvent WeaponPickup 0.0
  52.  
  53. // make the display visible
  54. Animate HudWeaponSelection Alpha "128" Linear 0.0 0.1
  55. Animate HudWeaponSelection SelectionAlpha "255" Linear 0.0 0.1
  56. Animate HudWeaponSelection FgColor "FgColor" Linear 0.0 0.1
  57. //Animate HudWeaponSelection TextColor "BrightFg" Linear 0.0 0.1
  58. Animate HudWeaponSelection TextScan "1" Linear 0.0 0.1
  59. }
  60.  
  61. event CloseWeaponSelectionMenu
  62. {
  63. StopEvent CloseWeaponSelectionMenu 0.0
  64. StopEvent WeaponPickup 0.0
  65.  
  66. // make the display visible
  67. Animate HudWeaponSelection Alpha "128" Linear 0.0 0.1
  68. Animate HudWeaponSelection SelectionAlpha "255" Linear 0.0 0.1
  69. Animate HudWeaponSelection FgColor "FgColor" Linear 0.0 0.1
  70. //Animate HudWeaponSelection TextColor "BrightFg" Linear 0.0 0.1
  71. Animate HudWeaponSelection TextScan "1" Linear 0.0 0.1
  72. }
  73.  
  74.  
  75. event MenuOpen
  76. {
  77. StopEvent MenuClose 0.0
  78.  
  79. // fade in
  80. Animate HudMenu Alpha "255" Linear 0.0 0.1
  81. Animate HudMenu SelectionAlpha "255" Linear 0.0 0.1
  82. Animate HudMenu FgColor "FgColor" Linear 0.0 0.1
  83. Animate HudMenu MenuColor "MenuColor" Linear 0.0 0.1
  84. Animate HudMenu ItemColor "ItemColor" Linear 0.0 0.1
  85. Animate HudMenu TextScan "1" Linear 0.0 0.1
  86.  
  87. // Undo any blur
  88. Animate HudMenu Blur "1" Linear 0.0 0.01
  89. }
  90.  
  91. event MenuClose
  92. {
  93. // Hide it
  94. Animate HudMenu Alpha "0" Linear 0.0 1
  95. Animate HudMenu SelectionAlpha "0" Linear 0.0 1
  96. Animate HudMenu FgColor "0 0 0 0" Linear 0.0 1
  97. Animate HudMenu MenuColor "0 0 0 0" Linear 0.0 1
  98. Animate HudMenu ItemColor "0 0 0 0" Linear 0.0 1
  99. }
  100.  
  101. event MenuPulse
  102. {
  103. Animate HudMenu Blur "7" Linear 0.0 0.1
  104. Animate HudMenu Blur "2" Deaccel 0.1 0.1
  105. Animate HudMenu Blur "7" Linear 0.2 0.1
  106. Animate HudMenu Blur "2" Deaccel 0.3 0.1
  107. Animate HudMenu Blur "7" Linear 0.4 0.1
  108. Animate HudMenu Blur "2" Deaccel 0.5 0.1
  109. Animate HudMenu Blur "1" Deaccel 0.6 0.4
  110. }
  111.  
  112. event TimerIncrement
  113. {
  114. Animate HudTimer Blur "7" Linear 0.0 0.1
  115. Animate HudTimer Blur "2" Deaccel 0.1 0.8
  116. Animate HudTimer Blur "0" Deaccel 1.1 1.5
  117. }
  118.  
  119. event TimerDecrement
  120. {
  121. Animate HudTimer Blur "7" Linear 0.0 0.1
  122. Animate HudTimer Blur "2" Deaccel 0.1 0.8
  123. Animate HudTimer Blur "0" Deaccel 1.1 1.5
  124. }
  125.  
  126.  
  127. event ResourceIncrement
  128. {
  129. Animate HudResources Blur "3" Linear 0.0 0.0
  130. Animate HudResources PulseAmount "0" Linear 0.0 0.01
  131. Animate HudResources Blur "1" Deaccel 0.1 1.5
  132. Animate HudResources PulseAmount "1" Linear 0.1 2
  133.  
  134. Animate HudResources PulseAmount "0" Linear 2 2
  135. }
  136.  
  137. event ResourceDecrement
  138. {
  139. Animate HudResources Blur "7" Linear 0.0 0.0
  140. Animate HudResources PulseAmount "0" Linear 0.0 0.01
  141. Animate HudResources Blur "1" Deaccel 0.1 1.5
  142. Animate HudResources PulseAmount "1" Linear 0.1 2
  143.  
  144. Animate HudResources PulseAmount "0" Linear 2 2
  145. }
  146.  
  147. event ResourcePickup
  148. {
  149. Animate HudResourcesPickup Alpha "255" Linear 0 0
  150. Animate HudResourcesPickup Position "80 r40" Linear 0 0
  151. Animate HudResourcesPickup Position "80 r120" Deaccel 0 1
  152. Animate HudResourcesPickup Blur "7" Deaccel 0 0.2
  153. Animate HudResourcesPickup Alpha "0" Deaccel .8 0.2
  154. Animate HudResourcesPickup Blur "1" Deaccel 0.2 0.3
  155. }
  156.  
  157. event HintMessageShow
  158. {
  159. Animate HudHintDisplay HintSize "1" Deaccel 0.0 0.3
  160. Animate HudHintDisplay FgColor "FgColor" Linear 0.4 0.4
  161.  
  162. // flash text
  163. Animate HudHintDisplay FgColor "FgColor" Linear 1.5 0.01
  164. Animate HudHintDisplay FgColor "255 220 0 255" Linear 2.0 0.2
  165. Animate HudHintDisplay FgColor "FgColor" Linear 2.2 0.2
  166. Animate HudHintDisplay FgColor "255 220 0 255" Linear 3.0 0.2
  167. Animate HudHintDisplay FgColor "FgColor" Linear 3.2 0.2
  168.  
  169. // hide the panel after a while
  170. Animate HudHintDisplay FgColor "255 220 0 0" Linear 10.0 0.2
  171. Animate HudHintDisplay HintSize "0" Deaccel 10.2 0.3
  172. }
  173.  
  174.  
  175. event HintMessageHide
  176. {
  177. Animate HudHintDisplay FgColor "255 220 0 0" Linear 0.0 0.2
  178. Animate HudHintDisplay HintSize "0" Deaccel 0.2 0.3
  179. }
  180.  
  181. event KeyHintMessageShow
  182. {
  183. // show the hints
  184. Animate HudHintKeyDisplay Alpha 255 Linear 0.0 0.5
  185.  
  186. // flash text
  187. Animate HudHintKeyDisplay FgColor "FgColor" Linear 0.0 0.01
  188. Animate HudHintKeyDisplay FgColor "255 220 0 255" Linear 0.5 0.2
  189. Animate HudHintKeyDisplay FgColor "FgColor" Linear 0.7 0.2
  190. Animate HudHintKeyDisplay FgColor "255 220 0 255" Linear 1.5 0.2
  191. Animate HudHintKeyDisplay FgColor "FgColor" Linear 1.7 0.2
  192.  
  193. // hide the panel after a while
  194. Animate HudHintKeyDisplay Alpha 0 Linear 12.0 1.0
  195. }
  196.  
  197. event KeyHintMessageHide
  198. {
  199. Animate HudHintKeyDisplay Alpha 0 Linear 0.0 0.5
  200. }
  201.  
  202. //===========================================
  203. //Health Bonus Pulse
  204. event HudHealthBonusPulse
  205. {
  206. Animate PlayerStatusHealthBonusImage Alpha "255" Linear 0.0 0.2
  207. Animate PlayerStatusHealthBonusImage Alpha "0" Linear 0.2 0.4
  208.  
  209. Animate PlayerStatusHealthvalue_minmode Alpha "255" Linear 0.0 0.2
  210. Animate PlayerStatusHealthvalue_minmode Alpha "255" Linear 0.2 0.4
  211.  
  212. RunEvent HudHealthBonusPulseLoop 0.4
  213.  
  214. Animate PlayerStatusHealthvalue_minmode alpha 255 linear 0.0 0.01
  215. Animate PlayerStatusHealthvalue_minmode FgColor "HudIcon_Green" Accel 0.0 0.0
  216. }
  217.  
  218. // call to loop HudHealthBonusPulse
  219. event HudHealthBonusPulseLoop
  220. {
  221. RunEvent HudHealthBonusPulse 0.0
  222. }
  223.  
  224. event HudHealthBonusPulseStop
  225. {
  226. StopEvent HudHealthBonusPulse 0.0
  227. StopEvent HudHealthBonusPulseLoop 0.0
  228. Animate PlayerStatusHealthvalue_minmode alpha 255 linear 0.0 0.0
  229. Animate PlayerStatusHealthvalue_minmode fgcolor "m0rewhite" accel 0.0 0.0
  230. }
  231.  
  232. //===========================================
  233.  
  234. //Health Dying Pulse
  235. event HudHealthDyingPulse
  236. {
  237. Animate PlayerStatusHealthBonusImage Alpha "255" Linear 0.0 0.075
  238. Animate PlayerStatusHealthBonusImage Alpha "0" Linear 0.125 0.075
  239.  
  240. Animate PlayerStatusHealthvalue_minmode Alpha "255" Linear 0.0 0.075
  241. Animate PlayerStatusHealthvalue_minmode Alpha "255" Linear 0.125 0.075
  242. Animate PlayerStatusHealthvalue_minmode alpha 255 linear 0.0 0.0
  243. Animate PlayerStatusHealthvalue_minmode FgColor "226 0 0 255" linear 0.0 0.0
  244.  
  245. RunEvent HudHealthDyingPulseLoop 0.25
  246. }
  247.  
  248. // call to loop HudHealthDyingPulse
  249. event HudHealthDyingPulseLoop
  250. {
  251. RunEvent HudHealthDyingPulse 0.0
  252. }
  253.  
  254. event HudHealthDyingPulseStop
  255. {
  256. StopEvent HudHealthDyingPulse 0.0
  257. StopEvent HudHealthDyingPulseLoop 0.0
  258. Animate PlayerStatusHealthvalue_minmode alpha 255 linear 0.0 0.0
  259. Animate PlayerStatusHealthvalue_minmode fgcolor "m0rewhite" accel 0.0 0.0
  260. }
  261.  
  262. //===========================================
  263.  
  264. event HudLowAmmoPulse
  265. {
  266. Animate HudWeaponLowAmmoImage Alpha "255" Linear 0.0 0.075
  267. Animate HudWeaponLowAmmoImage Alpha "0" Linear 0.125 0.075
  268.  
  269. Animate AmmoInClip FgColor "200 0 0 255" Linear 0.0 0.075
  270. Animate AmmoInClip FgColor "255 0 0 255" Linear 0.125 0.075
  271.  
  272. Animate AmmoInReserve FgColor "200 0 0 255" Linear 0.0 0.075
  273. Animate AmmoInReserve FgColor "255 0 0 255" Linear 0.125 0.075
  274.  
  275. Animate AmmoNoClip FgColor "200 0 0 255" Linear 0.0 0.075
  276. Animate AmmoNoClip FgColor "255 0 0 255" Linear 0.125 0.075
  277.  
  278. RunEvent HudLowAmmoPulseLoop 0.25
  279. }
  280.  
  281. event HudLowAmmoPulseLoop
  282. {
  283. RunEvent HudLowAmmoPulse 0.0
  284. }
  285.  
  286. event HudLowAmmoPulseStop
  287. {
  288. StopEvent HudLowAmmoPulse 0.0
  289. StopEvent HudLowAmmoPulseLoop 0.0
  290.  
  291. Animate AmmoInClip FgColor "m0rewhite" Linear 0.0 0.0
  292.  
  293. Animate AmmoInReserve FgColor "m0rewhite" Linear 0.0 0.0
  294.  
  295. Animate AmmoNoClip FgColor "m0rewhite" Linear 0.0 0.0
  296. }
  297.  
  298. //===========================================
  299.  
  300. event ControlPointIconShrink
  301. {
  302. Animate HudControlPointIcons icon_expand "0" Linear 0.0 0.2
  303. }
  304.  
  305. event ControlPointIconGrow
  306. {
  307. Animate HudControlPointIcons icon_expand "4" Linear 0.0 0.2
  308. }
  309.  
  310. // Metal Account
  311.  
  312. //activecolor - instantly turn red, fade back to yellow
  313. event AccountMoneyRemoved
  314. {
  315. Animate HudAccount FgColor "HudIcon_Red" Linear 0.0 0.0001
  316. Animate HudAccount FgColor "OrangeDim" Accel 0.0 3.0
  317.  
  318. Animate HudAccount Ammo2Color "HudIcon_Red" Linear 0.0 0.0001
  319. Animate HudAccount Ammo2Color "0 0 0 0" Accel 0.0 3.0
  320. }
  321.  
  322. //activecolor - instantly turn green, fade back to yellow
  323. event AccountMoneyAdded
  324. {
  325. Animate HudAccount FgColor "HudIcon_Green" Linear 0.0 0.0001
  326. Animate HudAccount FgColor "OrangeDim" Accel 0.0 3.0
  327.  
  328. Animate HudAccount Ammo2Color "HudIcon_Green" Accel 0.0 0.0001
  329. Animate HudAccount Ammo2Color "0 0 0 0" Accel 0.0 3.0
  330. }
  331.  
  332. event AccountMoneyInvisible
  333. {
  334. Animate HudAccount FgColor "OrangeDim" Accel 0.0 0.0001
  335. Animate HudAccount Ammo2Color "0 0 0 0" Accel 0.0 0.0001
  336. }
  337.  
  338. //===========================================
  339.  
  340. event FlagOutlineHide
  341. {
  342. Animate OutlineImage Alpha "0" Linear 0.0 0.1
  343. }
  344.  
  345. // Local player flag pickup/drop
  346. event FlagOutline
  347. {
  348. RunEvent FlagOutlineHide 0.0
  349. Animate OutlineImage Alpha "255" Linear 0.1 0.2
  350.  
  351. Animate OutlineImage Position "c-200 140" Linear 0.1 0.2
  352. Animate OutlineImage Size "400 200" Linear 0.1 0.2
  353.  
  354. Animate OutlineImage Position "c-50 r137" Linear 0.7 0.2 [$WIN32]
  355. Animate OutlineImage Position "c-50 r158" Linear 0.7 0.2 [$X360]
  356. Animate OutlineImage Size "100 50" Linear 0.7 0.2
  357.  
  358. Animate OutlineImage Alpha "0" Linear 0.9 0.1
  359. }
  360.  
  361. //===========================================
  362.  
  363. // Spy Disguise
  364. event HudSpyDisguiseChanged
  365. {
  366. Animate PlayerStatusSpyOutlineImage Alpha "0" Linear 0.0 0.2
  367.  
  368. Animate PlayerStatusSpyOutlineImage Position "c-200 c-200" Linear 0.0 0.2
  369. Animate PlayerStatusSpyOutlineImage Size "400 400" Linear 0.0 0.2
  370.  
  371. RunEvent HudSpyDisguiseHide 0.7
  372. }
  373.  
  374. event HudSpyDisguiseHide
  375. {
  376. Animate PlayerStatusSpyOutlineImage Position "3 413" Linear 0.0 0.2
  377. Animate PlayerStatusSpyOutlineImage Size "55 55" Linear 0.0 0.2
  378.  
  379. Animate PlayerStatusSpyOutlineImage Alpha "0" Linear 0.2 0.1
  380. }
  381.  
  382. event HudSpyDisguiseFadeIn
  383. {
  384. RunEvent HudSpyDisguiseChanged 0
  385. Animate PlayerStatusClassImage Alpha "255" Linear 0.0 0.0
  386. }
  387.  
  388. event HudSpyDisguiseFadeOut
  389. {
  390. RunEvent HudSpyDisguiseChanged 0
  391. Animate PlayerStatusClassImage Alpha "0" Linear 0.0 0.0
  392. }
  393.  
  394. //===========================================
  395.  
  396. // Show the Overtime panel
  397. event OvertimeShow
  398. {
  399. Animate OvertimeLabel Alpha "255" Linear 0.0 0.1
  400. Animate OvertimeBG Alpha "255" Linear 0.0 0.1
  401. }
  402.  
  403.  
  404. event HudSnapShotReminderIn
  405. {
  406. Animate ScreenshotPanel Position "c-83 -50" Linear 0.0 0.001
  407. Animate ScreenshotPanel Position "c-83 13" Spline 0.001 0.2
  408. }
  409.  
  410. event HudTournamentSetupPanelOpen
  411. {
  412. Animate HudTournamentSetup Position "c-90 -70" Linear 0.0 0.001
  413. Animate HudTournamentSetup Position "c-90 70" Spline 0.001 0.18
  414. }
  415.  
  416. event HudTournamentSetupPanelClose
  417. {
  418. Animate HudTournamentSetup Position "c-90 70" Linear 0.0 0.001
  419. Animate HudTournamentSetup Position "c-90 -70" Spline 0.001 0.18
  420. }
  421.  
  422.  
  423. //====================================
  424. // Flash the medic charge hud when we have full charge
  425.  
  426. event HudMedicCharged
  427. {
  428. Animate ChargeMeter FgColor "61 202 53 255" Linear 0.0 0.1
  429. Animate ChargeMeter FgColor "19 165 12 255" Linear 0.3 0.4
  430.  
  431. RunEvent HudMedicChargedLoop 0.6
  432. }
  433.  
  434. // call to loop HudHealthBonusPulse
  435. event HudMedicChargedLoop
  436. {
  437. RunEvent HudMedicCharged 0.0
  438. }
  439.  
  440. event HudMedicChargedStop
  441. {
  442. StopEvent HudMedicCharged 0.0
  443. StopEvent HudMedicChargedLoop 0.0
  444.  
  445. Animate ChargeMeter FgColor "255 255 255 255" Linear 0.0 0.0001
  446. }
  447.  
  448. //====================================
  449.  
  450. event VideoCaptionFadeIn
  451. {
  452. Animate VideoCaption Alpha "255" Linear 0.0 0.1
  453. }
  454.  
  455. event VideoCaptionFadeOut
  456. {
  457. Animate VideoCaption Alpha "0" Linear 0.0 0.1
  458. }
  459.  
  460. //====================================
  461.  
  462. // arena
  463.  
  464. event ArenaVsPanelOnShow
  465. {
  466. Animate bluepanel Position "-200 50" Linear 0.0 0.001
  467. Animate redpanel Position "r-200 140" Linear 0.0 0.001
  468. Animate vslabel Alpha "0" Linear 0.0 0.001
  469.  
  470. RunEvent ArenaVsPanelSlideIn 1.0
  471. RunEvent ArenaVsPanelSlideOut 4.8
  472. }
  473.  
  474. event ArenaVsPanelSlideIn
  475. {
  476. Animate bluepanel Position "c-100 50" Spline 0.0 0.2
  477. Animate redpanel Position "c-100 140" Spline 0.0 0.2
  478. Animate vslabel Alpha "255" Linear 0.15 0.2
  479. }
  480.  
  481. event ArenaVsPanelSlideOut
  482. {
  483. Animate bluepanel Position "-200 50" Spline 0.0 0.2
  484. Animate redpanel Position "r-200 140" Spline 0.0 0.2
  485. Animate vslabel Alpha "0" Linear 0.0 0.05
  486. }
  487.  
  488. //===========================================
  489.  
  490. //Cart Alarm Pulse
  491. event HudCartAlarmPulse
  492. {
  493. Animate EscortItemImageAlert Alpha "160" Linear 0.0 0.3
  494. Animate EscortItemImageAlert Alpha "0" Linear 0.6 0.3
  495.  
  496. RunEvent HudCartAlarmPulseLoop 1.2
  497. }
  498.  
  499. event HudCartAlarmPulseLoop
  500. {
  501. RunEvent HudCartAlarmPulse 0.0
  502. }
  503.  
  504. event HudCartAlarmPulseStop
  505. {
  506. StopEvent HudCartAlarmPulse 0.0
  507. StopEvent HudCartAlarmPulseLoop 0.0
  508. }
  509.  
  510. //===========================================
  511.  
  512. // Active Timer BG Pulse
  513. event ActiveTimerBGPulse
  514. {
  515. Animate ActiveTimerBG Alpha "255" Linear 0.0 0.1
  516. Animate ActiveTimerBG Alpha "0" Linear 0.2 0.1
  517.  
  518. Animate ActiveTimerBG Alpha "255" Linear 0.4 0.1
  519. Animate ActiveTimerBG Alpha "0" Linear 0.6 0.1
  520.  
  521. Animate ActiveTimerBG Alpha "255" Linear 0.8 0.1
  522. Animate ActiveTimerBG Alpha "0" Linear 1.0 0.1
  523.  
  524. Animate ActiveTimerBG Alpha "255" Linear 1.2 0.1
  525. }
  526.  
  527. //===========================================
  528.  
  529. event TeamsFullArrowAnimate
  530. {
  531. Animate TeamsFullArrow Position "c-118 165" Linear 0 0
  532. Animate TeamsFullArrow Position "c-118 180" Linear 0 0.4
  533. Animate TeamsFullArrow Position "c-118 165" Linear 0.4 0.4
  534.  
  535. RunEvent TeamsFullArrowAnimateLoop 0.8
  536. }
  537.  
  538. event TeamsFullArrowAnimateLoop
  539. {
  540. RunEvent TeamsFullArrowAnimate 0.0
  541. }
  542.  
  543. event TeamsFullArrowAnimateEnd
  544. {
  545. StopEvent TeamsFullArrowAnimate 0.0
  546. StopEvent TeamsFullArrowAnimateLoop 0.0
  547. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement