## Step Sounds - Brew 01AUG10 (ref: Project3)
## Play a different sound with each terrain type
## You must have a file "terrain_x.ogg" in the Audio\SE folder
## Where 'x' is the terrain number. (1-7)
class Game_Player
alias step_sounds_increase_steps increase_steps
def increase_steps
step_sounds_increase_steps
## Frequency of sound effect. % 2 approx. every 0.5 seconds
## % 4 would be approx. every 1 second
if $game_party.steps % 2 == 0
if terrain_tag > 0
#play the sound for that terrain
if FileTest.exist?("Audio/SE/terrain_" + terrain_tag.to_s + ".ogg")
Audio.se_play("Audio/SE/terrain_" + terrain_tag.to_s)
end
end
end
end
end
terrain_tag должен быть ненулевым. Меняется он
тут.
Для каждого тага кидаете в папку Audio\SE файл terrain_x.ogg, где x - terrain_tag.
Строка
if $game_party.steps % 2 == 0
меняет частоту, где %2 - 0,5 сек, %4 - 1 сек, и т.д. и т.п.
Скрипт
отсюда.