• 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!
  • Akari, Selene, Mint, Solana - 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.

Diving through a map

  • 69
    Posts
    15
    Years
    • Seen Sep 26, 2016
    Hey community, I've another question.
    The player can dive in my game.
    Everything works fine for me.
    But look at this:

    [PokeCommunity.com] Diving through a map

    When I dive into a cave the player is not on his Pokemon anymore.
    How can I Change this?

    Thx guys :-)
     
    Whenever you transfer the player to another map using the built-in event command, Essentials automatically cancels all vehicles. However, Essentials has a script method Kernel.pbTransferUnderwater that you can probably call from a script command in the doorway's event rather than using the Transfer Player command.

    Code:
    Kernel.pbTransferUnderwater(map_id, x_coord, y_coord)

    Take the mapid, x, and y from your current transfer command and put it in that script in your door's event, and remove the Transfer command you have in there already. See if that works.

    ----

    If that doesn't work for some reason, you may want to try the following script placed in an "autorun-once" event on the underwater cave map (that is, an autorun event on the map that checks for tsIsOff?("A")):

    Code:
    $PokemonGlobal.diving=true
    Kernel.pbUpdateVehicle
    setTempSwitchOn("A")

    This should force the player into diving mode anytime they enter that map.
     
    Back
    Top