• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Essentials v16.2+] Water Bubble

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
  • Water_Bubble.gif

    I made a new Water Bubble Overworld, fixing dependent events bugs. Let's go!

    First, save this image (called by water) inside Picture folder:
    water.png


    If you want to use it in v16.2, check here:
    https://www.pokecommunity.com/showthread.php?p=10154891#post10154891

    Now, find 'Sprite_WaterReflection' script and below that script, add a new script called "Sprite_WaterBubble" (or whatever you want) and paste this code inside the new script:
    Spoiler:


    Now, find 'Sprite_Character' script. Then:
    Spoiler:


    To the event doesn't works (won't show the water bubble effect) you need to put a Comment NoWater inside the event, to each page. Example to (Item Overworld event into the GIF):
    Spoiler:


    JUST A P.S. DON'T COPY:
    That is the code to check if event are walking into "beach" base tile (to remove the water bubble effect if not). You can add more if you want to:
    Code:
        currentTag = pbGetTerrainTag(event)
        if currentTag!=PBTerrain::Beach
          # Just-in-time disposal of sprite 
          if @sprite
            @sprite.dispose
            @sprite = nil
          end
          return
        end
    P.S: I made a new terrain tag called "Beach", inside 'PBTerrain':
    Spoiler:


    Thanks KleinStudio for the code about water bubble animation.

    Give credits to me (WolfPP) and KleinStudio (because i copied his "water bubble animation" into Water Bubble script) if use.

    Cya!
     
    Last edited:

    Lazy Catalyst

    What you do, the way you think, makes you differen
    91
    Posts
    6
    Years
  • Wolf bro
    I always had this one doubt about Water bubbles and Footprints, I don't know if its foolish to ask but can you please clarify it for me?
    Since the beach is an autotile and we want the water bubbles and footprints both to appear on the same tile which has a specific terrain tag, how do we do it?
    Here's what I mean:
    IZXE10R.png

    Or is it another tile for Water bubbles?
    Please give a reply
     

    Lazy Catalyst

    What you do, the way you think, makes you differen
    91
    Posts
    6
    Years
  • Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Ok Wolf bro
    The Overworld Shadows script worked fine but this script gave an error
    I added the script correctly and also added the new terrain beach but no luck, any ideas why it's happening?
    The error:
    MEblq1C.png

    When is that happens? When you leave into the map? Get an item into overworld? Give me more details.

    Also if you added a new terrain tag, did you try to start a new game?

    EDIT: I made a little upgrade. Copy all the code again.
     
    Last edited:

    Lazy Catalyst

    What you do, the way you think, makes you differen
    91
    Posts
    6
    Years
  • The error first popped up when I loaded my save file, then I deleted the save data and when I clicked on the "New Game" it popped up again.
    Let me try the new code. I will let you know if it works fine.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • The error first popped up when I loaded my save file, then I deleted the save data and when I clicked on the "New Game" it popped up again.
    Let me try the new code. I will let you know if it works fine.

    So, check all the steps again about Shadow Overworld and others effects than i made.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I used the new code and checked again but the same error pops up

    Rec a video or gif and show me in action.

    EDIT:
    This is my 'Sprite_Character' script with Tall Grass, Water Bubble and Shadow Overworld. Copy and replace for what you have:
    Spoiler:


    And check if the error appears again.
     
    Last edited:

    Lazy Catalyst

    What you do, the way you think, makes you differen
    91
    Posts
    6
    Years
  • Alright Wolf, I used your 'Sprite_Character' script and added all the three scripts and Now the error dissapeared and water bubbles is working fine
    I will test it some more, and will keep you informed 👍
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Alright Wolf, I used your 'Sprite_Character' script and added all the three scripts and Now the error dissapeared and water bubbles is working fine
    I will test it some more, and will keep you informed 👍

    Pay attention when you are copying some code. That's why i sent all the code.
     

    Lazy Catalyst

    What you do, the way you think, makes you differen
    91
    Posts
    6
    Years
  • Pay attention when you are copying some code. That's why i sent all the code.

    I copied it correctly, last time I didn't added the tall grass code but now I did. I think it was the cause for that error.
    I will do all the three scripts again, without using your Sprite Character script and I will check if it works. If not I will inform you bro

    EDIT: I ran a few tests in the Essentials in which the water bubble script was working.

    I tested it by removing the Tall grass script but not the Sprite_Character script and the error popped up again. After a few changes I tested the code again by removing the Tall grass script but not the Sprite_Character script, this time no error popped up but code didn't work (That is, the water bubble animation disappeared). Just add your Overworld shadow script and water bubble script in a new Essentials and then you might be able to see the error. But with all the three scripts functioning, the code is working nicely!
     
    Last edited:
    39
    Posts
    8
    Years
    • Seen May 2, 2024
    Ok Wolf bro
    The Overworld Shadows script worked fine but this script gave an error
    I added the script correctly and also added the new terrain beach but no luck, any ideas why it's happening?
    The error:
    MEblq1C.png

    This also happends to me, if you add the code in a vanilla version it pops up this error. However if I add the other two scripts any error pops up, but neither the codes work, so I don't know what's going on.


    EDIT: Looking at the code I see that the only way for this to work is using the new terrain tag Beach. However this is not useful as you have to change the puddle to terrain tag 17 if you want this effect on it. I guess that's why you made the function "isBeach?", however inside the code you wrote "if currentTag==PBTerrain::Beach" (line 91), so if the terrain tag is not beach it doesn't work, which isn't useful. I think you should use here something as "if PBTerrain.isBeach?(currentTag)", however I don't know how to make it work as I know a little about ruby, despite I know other programming languages.
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Inside 'def update', remove 'return if coment event' and replace the first 'if' with this:
    Code:
       if event.character_name =="" || event.character_name == "nil" || currentTag!=PBTerrain::Beach ||
    event!=$game_player && pbEventCommentInput(event,0,"NoWater")
          # Just-in-time disposal of sprite 
          if @sprite
            @sprite.dispose
            @sprite = nil
          end
          return
        end

    Atted the main the script.
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Added 'def jump_sprite' to the script, while event jumps. Please copy main code again.
     

    Pikalex04

    The Project Hyper creator (Discord: Pikalex04#3285
    36
    Posts
    5
    Years
  • Hey I'm getting this error:

    Spoiler:


    Here is my Sprite_Character script, if you need it:
    Spoiler:
     
    Last edited:
    Back
    Top