• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

How to "surf" without pokemon help ?

  • 6
    Posts
    12
    Years
    Hello ! : )
    It looks like I'll need script help again.
    I would like allow the player to swim around without any pokemon.
    Can you tell me how can i make "surf" ability in some sense "natural" ?

    For example - player standing in front of the water tile. In party he/she got only Metapod, but after clicking action button there will be question "Would you like to use surf" ?

    I hope you'll understand.

    Thanks ! <3


    Oh, and sorry for my faulty english - I'm still learning this language.
     
    Hello t84un, your English isn't that bad so far :) understandable.

    Okay, from what I understand...

    You want to SURF, without a Pokémon surfing?
    You want the player to naturally KNOW, how to "swim"?
    So having a Pokémon in the party should be irrelevant, right?

    If this is all true, here's what I would do... I'm not at home right now, so I haven't tested this, my scripting knowledge is still pretty small... Replace ---> def Kernel.pbSurf <---

    Code:
    def Kernel.pbSurf
      if $game_player.pbHasDependentEvents?
        return false
      end
       x=$game_player.x
       y=$game_player.y
       currentTag=$game_map.terrain_tag(x,y)
       facingTag=Kernel.pbFacingTerrainTag
       if !pbIsSurfableTag?(currentTag) && pbIsSurfableTag?(facingTag)
        if Kernel.pbConfirmMessage(_INTL("The water is dyed a deep blue...  Would you like to surf?"))
          Kernel.pbMessage(_INTL("{1} used Surf!",$Trainer.name))
          surfbgm=pbGetMetadata(0,MetadataSurfBGM)
           if surfbgm
            pbCueBGM(surfbgm,0.5)
          end
          pbStartSurfing()
            return true
          end
        end
      return false
    end

    Let me know if this works? I tried putting spaces where I thought made the script look like a script, but my phone makes it look weird... Let me know if something errors since I can't fully remember if it's pbIsSurfableTag? or isSurfableTag? And I'm pretty sure that you must check dependent events first, since I've messed around with SURF in the past... I'm still learning lol

    EDIT:

    Maruno, if you see this and something is wrong, let me know so I can correct it, I'd like to know what I'm missing or where I'm making mistakes :) thank you.
     
    Last edited:
    Hell Yeah, this is it !
    It's working , and my swimming system is finally complete ! ^^
    Thank you so much Nickalooose you are amazing !



    woohoo !

    -----------------------------
    EDIT
    -----------------------------

    I've noticed small problem. When player starts surfing - hero spirite disapears.
    I have made "boy_surf" file with graphic but it is not displayed.
    I think it's not a big problem but i don't know how to fix it...
     
    Last edited:
    Ah that's good to know it works :)

    If the player disappears its probably because of 2 things, you've put your swimming char set in the wrong space on metadata (I too have done that thinking it was an error).. Or your char set has an alpha layer covering it (which I've also done in the past before I knew about alpha layers)... I'd check your charset and metadata to be sure
     
    Back
    Top