Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Footsteps.

This has probably been requested before and I've gone through the Submitted Scripts and found none like this. So, I am opening a request topic for this.

What I would like is a script that can play the sound of footsteps of a character each time they walk. The closer they get to you the louder their footsteps should be. You can customize how loud and how soft you want their footsteps to be. And you should also be able to customize what sound plays for their footsteps. Also, you should be able to add footsteps from characters other then your own. Possibly through a call script. Thanks for your help!

This is a pretty simple and easy request, therefore I did not bother to go into great detail.
 
This has already been awnsered, I forget where but search "Footstep Sound", or something relative like "Walking Sound".

or you could use this script I have found
Code:
#==============================================================================
# ** Hear_Steps
#------------------------------------------------------------------------------
#  by arevulopapo
#  9.11.2006
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  attr_accessor :hear_steps
  attr_accessor :step_sound
  #--------------------------------------------------------------------------
  alias hs_init initialize
  def initialize
    hs_init
    @hear_steps = true
    @step_sound = "Audio/SE/walk01"
  end
  alias hs_update update
  def update
    if self.moving? and self.hear_steps == true and (Graphics.frame_count + 2 * self.id) % (18 - @move_speed) == 0
      if self.screen_x > 0 and self.screen_x < 640 and self.screen_y > 0 and self.screen_y < 480
        volume = 100 - 5 * Math.sqrt((self.x - $game_player.x)**2 + (self.y - $game_player.y)**2)
        Audio.se_play(@step_sound, volume, 100)
      end
    end
    hs_update
  end
end

To change the volume go to these two lines and configurate it "        volume = 100 - 5 * Math.sqrt((self.x - $game_player.x)**2 + (self.y - $game_player.y)**2)
        Audio.se_play(@step_sound, volume, 100)".

To change the sound go to this line "@step_sound = "Audio/SE/walk01" and configurate the place and filename of the audio file.

No credit goes to me... and please give credit to whose name is in the sub-title.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top