counter 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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:track[$music_theme] = arrsize('cur_theme')
  10. end
  11. end
  12. if music_on = 1 and $music_theme <> '':
  13. if no isplay ($cur_theme[track[$music_theme]]):
  14. track[$music_theme] += 1
  15. if arrsize('cur_theme') <= track[$music_theme]:track[$music_theme] = 0
  16. end
  17. play $cur_theme[track[$music_theme]], volume
  18. end
  19. if race_start = 1:
  20. bcolor = rgb(255, 255, 255)
  21. refint
  22. *clr
  23. if race_hit = 0:
  24. race_miss += 1
  25. race_hit = 1
  26. elseif $race1[race_row] <> ' ' and race_row > 0:
  27. race_hit = 0
  28. end
  29. '<center><b><<$car>></b></center>'
  30. !!interior of the vehicle and the line route
  31. *pl $showcar
  32. *p $race1[race_row]
  33. if $race1[race_row] = '<center>-------FINISH--------</center>':
  34. race_start = 0
  35. !!return timer
  36. settimer 500
  37. wait 2000
  38. $metka = 'finish'
  39. $loc = 'RACE_COUNT'
  40. gt $loc, $metka
  41. end
  42. race_row += 1
  43. end
  44. --- counter ---------------------------------