• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Disable fly for a while

28
Posts
15
Years
  • Hi, is it possible to disable fly to just one certain city as long as a switch is on? It's essential for my storyline and it would be nice if someone can help out.
     

    FL

    Pokémon Island Creator
    2,454
    Posts
    13
    Years
    • Seen today
    In PokemonRegionMap, in the line 'if healspot && $PokemonGlobal.visitedMaps[healspot[0]]' add ' && (healspot[0]!=MAPNUMBER || !game_switches[SWITCHNUMBER])' for each map that you wish to disable fly. Change SWITCHNUMBER and MAPNUMBER for the numbers. Untested.
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    I don't know if you did this, but, I'd go to the fly script: PokemonHiddenMoves: Line766:

    Code:
    HiddenMoveHandlers::UseMove.add(:FLY,proc{|move,pokemon|
       if !$PokemonTemp.flydata[COLOR="Red"] || $game_switches[x]==true[/COLOR]
         Kernel.pbMessage(_INTL("Can't use that here."))
       end
       if !pbHiddenMoveAnimation(pokemon)
         Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
       end
       pbFadeOutIn(99999){
          $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
       }
       return true
    })

    That's what I would do... Change switch x to any other number.
     

    FL

    Pokémon Island Creator
    2,454
    Posts
    13
    Years
    • Seen today
    I don't know if you did this, but, I'd go to the fly script: PokemonHiddenMoves: Line766:

    Code:
    HiddenMoveHandlers::UseMove.add(:FLY,proc{|move,pokemon|
       if !$PokemonTemp.flydata[COLOR="Red"] || $game_switches[x]==true[/COLOR]
         Kernel.pbMessage(_INTL("Can't use that here."))
       end
       if !pbHiddenMoveAnimation(pokemon)
         Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
       end
       pbFadeOutIn(99999){
          $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
       }
       return true
    })

    That's what I would do... Change switch x to any other number.
    This way you completely disable fly when the switch is on. Steevie88 wants to disable cities on fly.
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Yeah I no, this switch would need to be turned on when enterring the city, turned off, when exiting...

    This was a way for people who don't know how to script to give them a start in learning.

    Scripting is hard, when your trying to jump into the deep end, without a float. ;)
     
    Back
    Top