hi, i'm using this small script for creating footstep sounds:
Problem is everything that moves on the map has footsteps now, including birds, rocks, light effects etc. So could someone edit this script so that only the character you're playing with has footsteps? Now, the script has only 29 lines, so i don't think it will involve a lot of work.
Thank a 'lot
#==============================================================================
# ** 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 = 50 - 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
# ** 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 = 50 - 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
Problem is everything that moves on the map has footsteps now, including birds, rocks, light effects etc. So could someone edit this script so that only the character you're playing with has footsteps? Now, the script has only 29 lines, so i don't think it will involve a lot of work.
Thank a 'lot