Help - Search - Members - Calendar
Full Version: Sounds when main character walks
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
revolverwinds
Anyway to do this? That is, have some squishy sounds when the main character takes steps. I feel like it should be somewhat straightforward, but after tinkering with event systems for awhile to no avail I came to ask the resident experts.
Night_Runner
I'm not sure if I count as an expert, but I think this should do the trick smile.gif

superafroboy
Found this script to do it as well, allows for different sounds for each terrain tag. Not sure if it would cause less lag or not:

CODE
## 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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.