Jump to content
Sign in to follow this  

Common Event: Footsteps Sound

Recommended Posts

Hi to all :)  I'm having a lag problem with my footsteps sound event.

I know that there are a ton of useful Footsteps scripts out there but I needed one that allows me to use both terrain and region tags so I wrote down one myself.

It runs very well but there is one little (super awful) problem... it causes lag!  Whenever this little brat is on the game stutters.


I tried to tweak the coding but none of my efforts were repaid :(



Common Event :  - Parallel Process - (+ Its own condition switch) 



$game_variables[12] = rand(4)




if $game_player.moving?
if $game_player.terrain_tag   == 1
    if Input.press?(:A) 
     else    wait(6)    end
    if $game_variables[12] == 0
     RPG::SE.new("grass1.mp3", 60, 100).play
    elsif $game_variables[12] == 1
     RPG::SE.new("grass2.mp3", 60, 100).play
    elsif $game_variables[12] == 2
     RPG::SE.new("grass3.mp3", 60, 100).play
    elsif $game_variables[12] == 3 
     RPG::SE.new("grass4.mp3", 60, 100).play
(This line is used when I want to read a region instead : if $game_player.region_id  == 21 )
So I don't know what I'm doing wrong :( Could someone help this lost soul? Thanks a lot in advance!
(P.S. I know for sure that the lag is caused solely by this event! In fact if I switch it off everything runs super smooth )
Edited by AMJ89

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.