RPG Maker Forums

So I'am using Theo's footstep script and it works just fine! But there's
a strange problem with the script, when you use the jump command
from the move route list or if you jump at all it plays the footstep sound.
Code:
# =============================================================================
# TheoAllen - Footstep Sound
# Version : 1.2
# =============================================================================
($imported ||= {})[:Theo_FootSound] = true
# =============================================================================
# Change Logs:
# -----------------------------------------------------------------------------
# 2018.03.02 - Change how the sound is handled (2)
# 2014.02.01 - Change how the sound is handled
# 2013.11.16 - Finished script
# =============================================================================
=begin

  Intro :
  Because walking with no sound is soooo boring ....
 
  How to use :
  Put the script below material and above main.
 
  > If you want an event to use footstep sound as well, put <footstep> tag by
    using comment.
  > If you want to change the footstep sound, use script call
    footstep[id] = RPG::SE.new("name", vol, pitch)
 
  Further instruction on setting.

  Terms of use :
  Credit me, TheoAllen. Feel free to use and edit as much as you want. Just dont
  claim it's yours. Gimme free copy for commercial use.
 
=end
#==============================================================================
# Configs :
#==============================================================================
module Theo
  module FSound
  #---------------------------------------------------------------------------
    RegionMode = false
  #---------------------------------------------------------------------------
  # Want to use region? If no (false) then it will use terrain tag
  #---------------------------------------------------------------------------
 
  # --------------------------------------------------------------------------
    List = {  # <-- No, dont touch this
  # --------------------------------------------------------------------------
  # Define the sound effect here with this following format
  #
  # ID => RPG::SE.new("Name",vol,pitch),
  #
  # - ID      >> ID for the region / terrain tag
  # - "Name"  >> SE name from Audio/SE
  # - vol     >> Volume SE (0 - 100)
  # - pitch   >> Pitch (50 - 150)
  # --------------------------------------------------------------------------
 
      0 => RPG::SE.new("Step",120,100),
      
    # Add more here
    # Don't forget comma!
      
  # --------------------------------------------------------------------------
    } # <-- No, dont touch this
  # --------------------------------------------------------------------------
 
  # --------------------------------------------------------------------------
    SoundDelay = [10,6] # [normal, dash]
  # --------------------------------------------------------------------------
  # A frame delay before playing next footstep sound
  # One for walking, later one for dashing
  # --------------------------------------------------------------------------
 
  end
end
#==============================================================================
# End of config
#==============================================================================
class Game_Interpreter
 
  def footstep
    $game_system.fsound
  end
 
end

class Game_System
  attr_reader :fsound
 
  alias theo_fsound_init initialize
  def initialize
    theo_fsound_init
    @fsound = Theo::FSound::List
  end
 
end

class Game_Event
 
  alias theo_fsound_init initialize
  def initialize(map_id, event)
    theo_fsound_init(map_id, event)
    @sound_delay = 0
  end

  def fsound_tile_data_id
    Theo::FSound::RegionMode ? region_id : terrain_tag
  end
 
  def footstep_sound
    $game_system.fsound[fsound_tile_data_id]
  end
 
  alias theo_fsound_update update
  def update
    theo_fsound_update
    update_footstep_sound if play_footstep?
  end
 
  def update_footstep_sound
    @sound_delay -= 1
    if @sound_delay <= 0 && moving?
      sound = footstep_sound
      sound.play if sound
      if dash?
        @sound_delay = Theo::FSound::SoundDelay[1]
      else
        @sound_delay = Theo::FSound::SoundDelay[0]
      end
    end
  end
 
  alias theo_fsound_page_setting setup_page_settings
  def setup_page_settings
    theo_fsound_page_setting
    setup_fsound
    @sound_delay = 0
  end 
 
  def setup_fsound
    @play_footstep = false
    @list.each do |command|
      next unless command.code == 108 || command.code == 408
      if command.parameters[0][/<footstep>/i]
        @play_footstep = true
      end
    end
  end
 
  def play_footstep?
    @play_footstep
  end
 
end

class Game_Player
 
  alias theo_fsound_init initialize
  def initialize
    theo_fsound_init
    @sound_delay = 0
  end

  def fsound_tile_data_id
    Theo::FSound::RegionMode ? region_id : terrain_tag
  end
 
  def footstep_sound
    $game_system.fsound[fsound_tile_data_id]
  end
 
  alias theo_fsound_update update
  def update
    theo_fsound_update
    update_footstep_sound
  end
 
  def update_footstep_sound
    @sound_delay -= 1
    if @sound_delay <= 0 && moving?
      sound = footstep_sound
      sound.play if sound
      if dash?
        @sound_delay = Theo::FSound::SoundDelay[1]
      else
        @sound_delay = Theo::FSound::SoundDelay[0]
      end
    end
  end
 
end
Can some one make an edit so that I can either cut off this script with a switch or make so that it dosn't play the footstep sound when we jump.

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,456
Members
137,821
Latest member
Capterson
Top