006_counter 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # counter
  2. if music_on <> music_on_prev or $music_theme <> $music_theme_prev:
  3. close $cur_theme[track[$music_theme_prev]]
  4. music_on_prev = music_on
  5. $music_theme_prev = $music_theme
  6. if $music_theme <>'':
  7. copyarr 'cur_theme', 'tracklist_<<$music_theme>>'
  8. track[$music_theme] = track[$music_theme]-1
  9. if track[$music_theme] < 0:
  10. track[$music_theme]=ARRSIZE('cur_theme')
  11. end
  12. end
  13. end
  14. if music_on = 1 and $music_theme <> '':
  15. if no isplay ($cur_theme[track[$music_theme]]):
  16. track[$music_theme] = track[$music_theme]+1
  17. if ARRSIZE('cur_theme') <= track[$music_theme]:
  18. track[$music_theme] = 0
  19. end
  20. end
  21. play $cur_theme[track[$music_theme]], volume
  22. end
  23. !race
  24. if race_start = 1:
  25. bcolor = rgb(255,255,255)
  26. REFINT
  27. *clr
  28. if race_hit=0:
  29. set race_miss += 1
  30. race_hit = 1
  31. end
  32. if $race1[race_row] <> ' ' and race_row > 0:
  33. race_hit = 0
  34. end
  35. '<center><b><<$car>></b></center>'
  36. !interior of the vehicle and the line route
  37. *PL $showcar
  38. *P $race1[race_row]
  39. if $race1[race_row] = '<center>-------FINISH--------</center>':
  40. set race_start = 0
  41. !return timer
  42. settimer 500
  43. wait 2000
  44. !return point
  45. set $metka = 'finish'
  46. set $loc = 'RACE_COUNT'
  47. GOTO $loc, $metka
  48. end
  49. race_row += 1
  50. end
  51. --- counter ---------------------------------