RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[REQUEST]A fairly easy script...

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 87
The name says it all!
Is there anyone who can make a script that makes a sound each time the character moves?(A footsteps sound is what I mean)
~~Mapper~~

*
A Random Custom Title
Rep:
Level 96
wah
Well, what about a parallel process common event that when you press up, down, etc., it plays the sound? Conditional branch. Also, that could get annoying at times. :P

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
what moo said. I had this in my zelda starter kit and yes it's annoying since when you get stuck in a wall and press forward it makes a sound, also you need different sounds because walking on grass isn't the same as walking on carpet in a house.
Watch out for: HaloOfTheSun

*
A Random Custom Title
Rep:
Level 96
wah
Well, if you have grass, you would need other sounds. Then, you could make the common events work on switches that get turned on in certain areas. Or, you could do it the old fashioned way:
EVENTS ON EVERY SQUARE. XD

**
Rep:
Level 87
The name says it all!
Thanks Moo! I'll try that.

**
Rep:
Level 88
I'm scared of my grandma. Wouldn't you be?
You could also use a different sound effect for different terrains. For example, 1 would be grass, 2 would be sand, etc.

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
You could also use a different sound effect for different terrains. For example, 1 would be grass, 2 would be sand, etc.

xD

that's what I said.
still now you need to event hella lot wherever the person cant walk needs an event to shut off the sound.
its not that hard, but annoying to do it every time. because if its set on pressing an arrow key = sound then I can be walking into a wall and not moving my feet but still hearing the sound.
Watch out for: HaloOfTheSun

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, I love events as much as anybody, but I think a script is better suited in this case.

I think that it would probably work if you go into Game_Player, and find this:

Code: [Select]
  def increase_steps
    super
    # If move route is not forcing
    unless @move_route_forcing
      # Increase steps
      $game_party.increase_steps
      # Number of steps are an even number
      if $game_party.steps % 2 == 0
        # Slip damage check
        $game_party.check_map_slip_damage
      end
    end
  end

Then throw this line in right after $game_party.increase_steps:

Code: [Select]
      Audio.se_play("Audio/SE/" + $footstep_se)

So that it becomes:

Code: [Select]
  def increase_steps
    super
    # If move route is not forcing
    unless @move_route_forcing
      # Increase steps
      $game_party.increase_steps
      Audio.se_play("Audio/SE/" + $footstep_se)
      # Number of steps are an even number
      if $game_party.steps % 2 == 0
        # Slip damage check
        $game_party.check_map_slip_damage
      end
    end
  end

Now, all you need to do is use a call script whenever you want to change the sound effect:

Code: [Select]
$footstep_se = "SE Filename"

For example, this would work:

Code: [Select]
$footstep_se = "002-System02"

You'd have to define this immediately by the way, before the player has a chance to move.
« Last Edit: May 31, 2007, 04:22:38 AM by Seamus »