• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

Pokemon Essentials Script Help

  • 1
    Posts
    59
    Days
    • Seen May 26, 2025
    Making a Pokemon game in essentials V21.1 the player can choose at the intro to play as a psychic character.
    The difference this makes to the game is mostly flavor text but for the Player abilities, these include so far Mind slash (CUT) so the player can cut down trees, Mind Crush (Rocksmash) to smash obstic;e rocks and Psy Teleport a player based (Fly) ability. the first two abilities work perfectly. however i just cant get the teleport ability to outside of debug mode. I'm getting a no method nill error when i run the game from the .exe

    the only scripting I've added that works when running the game inside RPGMXP for the teleport ability are these.
    MenuHandlers.add(:pause_menu, :psy_teleport, {
    "name" => _INTL("Teleport"),
    "order" => 100,
    "condition" => proc { next true if $game_switches[109] && !$game_switches[87] && $bag.has?(:TOWNMAP)},
    "effect" => proc { |menu|
    pbPlayDecisionSE
    pbFadeOutIn do
    scene = PokemonRegionMap_Scene.new(-1, false)
    screen = PokemonRegionMapScreen.new(scene)
    ret = screen.pbStartFlyScreen
    $game_temp.fly_destination = ret if ret
    ($game_temp.fly_destination) ? menu.pbEndScene : menu.pbRefresh
    end
    next pbTeleportToNewLocation
    }
    })

    def pbTeleportToNewLocation()
    return false if $game_temp.fly_destination.nil?
    if !$DEBUG
    $game_temp.fly_destination = nil
    yield if block_given?
    return false
    end
    if $game_switches[95]
    name = $player.name
    psy_Teleport = "Teleport"
    pbMessage(_INTL("{1} used {2}!", name, psy_Teleport))
    end
    $stats.fly_count += 1
    $teleporting = true
    pbSEPlay("Slots coin")
    $scene.spriteset.addUserAnimation(Settings::TELEPORT_ANIMATION_ID, $game_player.x, $game_player.y, true, 1)
    pbWait(0.35)
    pbFadeOutIn do
    $game_temp.player_new_map_id = $game_temp.fly_destination[0]
    $game_temp.player_new_x = $game_temp.fly_destination[1]
    $game_temp.player_new_y = $game_temp.fly_destination[2]
    $game_temp.player_new_direction = 2
    $game_temp.fly_destination = nil
    pbDismountBike
    $scene.transfer_player
    $game_map.autoplay
    $game_map.refresh
    yield if block_given?
    pbWait(0.25)
    end
    pbEraseEscapePoint
    return true
    end

    the specific error is as follows:

    [PokeCommunity.com] Pokemon Essentials Script Help
    [PokeCommunity.com] Pokemon Essentials Script Help

    been stuck on this for a week and cant get my head around whats causing the issue, any help would be appreciated
     
    Maybe the issue could be related to the fly destination ($game_temp.fly_destination). If it's nil when trying to teleport, the method pbTeleportToNewLocation will fail because the game doesn't know where to teleport you.
     
    Back
    Top