• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Efficient Water Puddle Animations + Sound Effects 2019-05-25

Pokémon Essentials Version
v17.2 ➖
waterpuddles.gif


Scripts exist for the bubble animation when walking through puddles, but add a lot of code to tackle a small problem. This can be achieved in V17 with a simple edit of the grass animation code.

First, download this folder with puddle effect sound and anim sheet.

Settings

Find this line:

Ruby:
Expand Collapse Copy
PLANT_SPARKLE_ANIMATION_ID   = 7

Add this directly below:

Ruby:
Expand Collapse Copy
PUDDLE_ANIMATION_ID          = 8 # or whichever animation ID you'd like to use

PField_Field

Find these lines:

Ruby:
Expand Collapse Copy
if PBTerrain.isJustGrass?(pbGetTerrainTag(event,true))  # Won't show if under bridge
      $scene.spriteset.addUserAnimation(GRASS_ANIMATION_ID,event.x,event.y,true,1)

Add this directly below it:

Ruby:
Expand Collapse Copy
elsif pbGetTerrainTag(event,true) == PBTerrain::Puddle
      if event == $game_player
        pbSEPlay("puddle", 100)
      else # reduce sound effect volume further away from player
        dist = ((event.x-$game_player.x).abs+(event.y-$game_player.y).abs)
        if dist <= 6 && dist >= 0
          pbSEPlay("puddle", [80,80,80,80,70,40,25][dist])
        end
      end
      $scene.spriteset.addUserAnimation(PUDDLE_ANIMATION_ID,event.x,event.y,true,0)

Alternatively, if you'd rather only the player makes a sound effect, use this instead:
Ruby:
Expand Collapse Copy
elsif pbGetTerrainTag(event,true) == PBTerrain::Puddle
      pbSEPlay("puddle", 100) if event == $game_player
      $scene.spriteset.addUserAnimation(PUDDLE_ANIMATION_ID,event.x,event.y,true,0)

Now, using the animation sheet create an animation using 3 frames for each bubble art frame:

exampleanim.PNG


And you're good to go!

Big thanks to Maruno, Nuri Yuri, Vendilly and DerxwnaKapsyla for helping out with adding the audio code.
Credits
Credit if used: Boonzeet
Author
boonzeet
Views
2,805
First release
Last update

Ratings

5.00 star(s) 1 ratings

More resources from boonzeet

Latest updates

  1. Sound effects for puddles

    The script is extended to support sound effects when stepping through puddles, for both the...

Latest reviews

I will like to install this on my game, but it's not available for v20.
Back
Top