JustKenneth
Developer Pokemon The Kingdom of Meralas
- 8
- Posts
- 15
- Years
- Belgium
- Seen Jun 21, 2017
Hello,
I've been looking for a way to implement some sort of teleport/flight service instead of HM02 Fly.
What I did first was insert following script under script section Pfield_HiddenMoves, under Fly.
It looks like this:
Example of the event in attachment!
I hope I could help at least someone...
CREDIT FOR THE SCRIPT GOES TO -FL-
make sure to check out FL's tutorial if you need to turn HM's into items.
Good day to all!
I've been looking for a way to implement some sort of teleport/flight service instead of HM02 Fly.
What I did first was insert following script under script section Pfield_HiddenMoves, under Fly.
It looks like this:
Code:
def canUseMoveFly?
if $game_player.pbHasDependentEvents?
Kernel.pbMessage(_INTL("It can't be used when you have someone with you.")) #you can comment this if necessary
return false
end
return true
end
def useMoveFly # Add useMoveFly in the event in a script command
scene=PokemonRegionMapScene.new(-1,false)
screen=PokemonRegionMap.new(scene)
ret=screen.pbStartFlyScreen
return false if !ret
$PokemonTemp.flydata=ret
if !$PokemonTemp.flydata
Kernel.pbMessage(_INTL("Can't use that here."))
end
if !pbHiddenMoveAnimation(nil)
Kernel.pbMessage(_INTL("{1} used {2}!",$Trainer.name,"Fly"))
end
pbFadeOutIn(99999){
Kernel.pbCancelVehicles
$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]
$PokemonTemp.flydata=nil
$game_temp.player_new_direction=2
$scene.transfer_player
$game_map.autoplay
$game_map.refresh
}
pbEraseEscapePoint
return true
end
Example of the event in attachment!
I hope I could help at least someone...
CREDIT FOR THE SCRIPT GOES TO -FL-
make sure to check out FL's tutorial if you need to turn HM's into items.
Good day to all!