• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Temporarily disable HM use?

  • 115
    Posts
    10
    Years
    • Seen Nov 17, 2023
    I have a small area inside of a map that the player can explore post-game (meaning they have all badges), but I don't want them to be able to use Surf while inside of this area. I figured that I could do this by temporarily taking away the badge that allows the player to Surf, but I realized that the HM system doesn't keep track of badges that way, it counts them instead. So taking away badge #4 when the player still has 7 means they can still surf, because 7 > 4.

    Is there any other way I can temporarily disable the use of surf?

    Bonus: I realize that by disabling surf the player can still teleport out of the area without passing through the event that re-enables surf, so I would need a way to disable teleport as well. The area is small, so it's unlikely that they will, but they still could.
     
    Last edited:
    Ypu can add a condition to these field moves that checks for a certain switch. If the switch is off the move can be used and if its on it can't be used
     
    Thanks Ego13, I figured it out. I just put these lines just before the conditional statement that prompts the user to surf:

    Code:
    if $game_switches[159]
         Kernel.pbMessage(_INTL("NO SURF."))
        return false
        end

    The no surf message was for testing purposes and isn't necessary.

    EDIT: Slight correction, the "return false" line needs to be inside the if statement, otherwise the player will never be prompted to surf ever again. I fixed the code shown above.
     
    Last edited:
    Back
    Top