1
0

006_counter 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. !race
  20. if race_start = 1:
  21. bcolor = rgb(255, 255, 255)
  22. refint
  23. *clr
  24. if race_hit = 0:
  25. set race_miss += 1
  26. race_hit = 1
  27. end
  28. if $race1[race_row] <> ' ' and race_row > 0:race_hit = 0
  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. set race_start = 0
  35. !return timer
  36. settimer 500
  37. wait 2000
  38. !return point
  39. set $metka = 'finish'
  40. set $loc = 'RACE_COUNT'
  41. gt $loc, $metka
  42. end
  43. race_row += 1
  44. end
  45. --- counter ---------------------------------