Advertisement
Deji

Good SCM Demo (v1 definition files)

Feb 13th, 2012
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. 1@ = 0 // stage
  2. 2@ = 0 // airtime start
  3. 3@ = 0 // airtime finish
  4. 4@ = 0 // total airtime
  5.  
  6. while true
  7. wait 0
  8. if
  9. 0256: is_player_playing $PLAYER_CHAR
  10. then
  11. if
  12. 00DF: is_char_in_any_car $PLAYER_ACTOR
  13. then
  14. if
  15. 1@ == 0 // stage 0 - we haven't already got the car handle, get it
  16. then
  17. 03C0: 0@ = store_car_char_is_in_no_save $PLAYER_ACTOR
  18. 1@ = 1 // we've got the car handle, next stage!
  19. end
  20.  
  21. if
  22. 8119: not is_car_dead 0@ // better keep making sure handle is valid before using it
  23. then
  24. if
  25. 00DB: is_char_in_car $PLAYER_ACTOR car 0@
  26. then
  27. if
  28. 1@ == 1 // stage 1 - waiting for airtime to start
  29. then
  30. if
  31. 01F3: is_car_in_air_proper 0@
  32. then
  33. 01BD: get_game_timer 2@
  34. 1@ = 2 // airtime started, next stage!
  35. end
  36. end
  37. if
  38. 1@ == 2 // stage 2 - airtime in progress
  39. then
  40. if
  41. 81F3: not is_car_in_air_proper 0@
  42. then
  43. // airtime over
  44. 01BD: get_game_timer 3@
  45.  
  46. // get total air time
  47. 0085: 4@ = 3@
  48. 0062: 4@ -= 2@
  49.  
  50. if
  51. 4@ > 1000 // is total airtime worth noting?
  52. then
  53. // yes, make a big deal out of it
  54. 01E4: print_with_number 'AIRTIME' number 4@ time 2000 1 // not a real gxt, this is just an example script
  55. end
  56. 1@ = 3 // go to stage 3, where we reset stuff
  57. 2@ = 0
  58. 3@ = 0
  59. end
  60. end
  61. else
  62. 1@ = 4
  63. end
  64. else
  65. // car died, go to master reset stage!
  66. 1@ = 4
  67. end
  68. if
  69. 1@ == 3 // stage 3 - reset stuff and jump back a few stages
  70. then
  71. 1@ = 1 // go back to stage 1, where we still have the car handle but airtime hasn't started
  72. 2@ = 0
  73. 3@ = 0
  74. end
  75. if
  76. 1@ == 4 // stage 4 - reset stuff and start over
  77. then
  78. 1@ = 0
  79. 2@ = 0
  80. 3@ = 0
  81. end
  82. else
  83. 1@ = 0 // player exited car, reset the stage
  84. end
  85. end
  86. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement