- 232
- Posts
- 8
- Years
- Seen May 15, 2025
How do I give fly to teleport as well?
PLEASE, I NEED IT
PLEASE, I NEED IT
Fly takes you to a selected location (usually in front of a Pokemon Center) in the Town of your choice, Teleport takes you to the last Pokemon Center you used.
Since they both take you to a Pokemon Center I am not sure what you are asking, can you provide more details?
PScreen_Party
if isConst?(pkmn.moves[i].id,PBMoves,:FLY)
if isConst?(pkmn.moves[i].id,PBMoves,:FLY) || isConst?(pkmn.moves[i].id,PBMoves,:TELEPORT)
PField_FieldMoves
#===============================================================================
# Teleport
#===============================================================================
HiddenMoveHandlers::CanUseMove.add(:TELEPORT,proc { |move,pkmn,showmsg|
next false if !pbCheckHiddenMoveBadge(BADGE_FOR_FLY,showmsg) #Delete this line if a badge is not required.
if $game_player.pbHasDependentEvents?
pbMessage(_INTL("It can't be used when you have someone with you.")) if showmsg
next false
end
if !pbGetMetadata($game_map.map_id,MetadataOutdoor) #
pbMessage(_INTL("Can't use that here.")) if showmsg #Delete these lines if you want to use Teleport while indoors and in caves.
next false #
end #
next true
})
HiddenMoveHandlers::UseMove.add(:TELEPORT,proc { |move,pokemon|
if !$PokemonTemp.flydata
pbMessage(_INTL("Can't use that here."))
next false
end
if !pbHiddenMoveAnimation(pokemon)
pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
end
pbFadeOutIn {
$game_temp.player_new_map_id = $PokemonTemp.flydata[0]
$game_temp.player_new_x = $PokemonTemp.flydata[1]
$game_temp.player_new_y = $PokemonTemp.flydata[2]
$game_temp.player_new_direction = 2
$PokemonTemp.flydata = nil
$scene.transfer_player
$game_map.autoplay
$game_map.refresh
}
pbEraseEscapePoint
next true
})
Inaround line 1196 you should find where the game is checking to make sure your Pokemon knows the move Fly.Code:PScreen_Party
Code:if isConst?(pkmn.moves[i].id,PBMoves,:FLY)
Change it to check for Fly and Teleport.
Code:if isConst?(pkmn.moves[i].id,PBMoves,:FLY) || isConst?(pkmn.moves[i].id,PBMoves,:TELEPORT)
Next inaround line 914 you should see how Teleport is handled when the player tries to use it.Code:PField_FieldMoves
Replace it with this:
Code:#=============================================================================== # Teleport #=============================================================================== HiddenMoveHandlers::CanUseMove.add(:TELEPORT,proc { |move,pkmn,showmsg| next false if !pbCheckHiddenMoveBadge(BADGE_FOR_FLY,showmsg) #Delete this line if a badge is not required. if $game_player.pbHasDependentEvents? pbMessage(_INTL("It can't be used when you have someone with you.")) if showmsg next false end if !pbGetMetadata($game_map.map_id,MetadataOutdoor) # pbMessage(_INTL("Can't use that here.")) if showmsg #Delete these lines if you want to use Teleport while indoors and in caves. next false # end # next true }) HiddenMoveHandlers::UseMove.add(:TELEPORT,proc { |move,pokemon| if !$PokemonTemp.flydata pbMessage(_INTL("Can't use that here.")) next false end if !pbHiddenMoveAnimation(pokemon) pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move))) end pbFadeOutIn { $game_temp.player_new_map_id = $PokemonTemp.flydata[0] $game_temp.player_new_x = $PokemonTemp.flydata[1] $game_temp.player_new_y = $PokemonTemp.flydata[2] $game_temp.player_new_direction = 2 $PokemonTemp.flydata = nil $scene.transfer_player $game_map.autoplay $game_map.refresh } pbEraseEscapePoint next true })
This will make Teleport act like fly!