Duplicating Fly

Dragonite

Have they found the One Piece yet?
Member
Joined
Mar 24, 2017
Posts
254
In short, I'm trying to get the effects of Fly to work with other move(s). I've copied the HiddenMoveHandlers (both CanUseMove and UseMove) and have gone into the Ready menu and changed

Code:
if isConst?(move,PBMoves,:FLY)

to

Code:
if isConst?(move,PBMoves,:FLY)||isConst?(move, PBMoves, :WHIRLWIND)

(around-ish line 254) but it's still popping up a message telling me I can't use that move here due to $PokemonTempt.flydata not having a value.

I assume there're a few other things I have to do that I haven't seen yet?
 

Ulithium_Dragon

Trainer
Member
Joined
Sep 6, 2017
Posts
52
As near as I can tell, $PokemonTemp.flydata is an array used to store the destination map's ID, x-coord, and y-coord (in that order). So if it's spitting out that error, I'd assume those values are not being filled correctly for you alternate move. I think the values are obtained from the townmap PSB file.

I don't know if this will help you or not, but this is the code I used in my own game to have Fly be activated via a hotkey without a Pokemon in your party needing to know the move (I use it for a Flygon mount I created):

Code:
      #Added a new keybind, 'G' (can be changed) that triggers special mount events.
      if Input.press?(Input::G)
        if defined?($PokemonGlobal.mount::CanFly) #Check that our mount can Fly first.
          #Manually call the map used for the Fly HM.
          scene=PokemonRegionMapScene.new(-1,false)
          screen=PokemonRegionMap.new(scene)
          ret=screen.pbStartFlyScreen
          #Warp the player to their selection (ret) on the map.
          if ret
            Kernel.pbMessage(_INTL("{1} used Fly!",$PokemonGlobal.mount))
            #Sets temporary flydata based on what the player chose, then sets temp variables from flydata and clears flydata.
            #Transfer player to new map, return to playing.
            pbFadeOutIn(99999){
              $PokemonTemp.flydata=ret
              $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
            }
          end
      end

--------------------------------------
EDIT: I found this, seems to be exactly what you're looking to do:
http://pokemonessentials.wikia.com/..._battle#Giving_multiple_moves_the_same_effect
 
Top