The PokéCommunity Forums Fan Games Game Development
Question Prevent Player from Capturing Pokémon!

Game Development Your number one stop for anything related to creating games (except ROM hacks). You can even make your own!


Reply
 
Thread Tools
  #1    
Old 1 Week Ago (11:17 PM).
_Lendaryo_'s Avatar
_Lendaryo_ _Lendaryo_ is offline
     
    Join Date: Aug 2017
    Location: Brasil
    Gender: Male
    Nature: Serious
    Posts: 34
    How can I prevent the player from capturing or using Pokeballs on certain maps?
    Reply With Quote

    Relevant Advertising!

      #2    
    Old 1 Week Ago (4:00 PM).
    Marin's Avatar
    Marin Marin is offline
    Not Bored
     
    Join Date: Nov 2016
    Age: 16
    Gender: Other
    Posts: 682
    In the PokeBattle_Battle script, find this piece of code (lines 61 - 64 in a clean project if I'm not mistaken)
    Code:
        if @opponent && (!pbIsSnagBall?(ball) || !battler.isShadow?)
          @scene.pbThrowAndDeflect(ball,1)
          pbDisplay(_INTL("The Trainer blocked the Ball!\nDon't be a thief!"))
        else
    Change it to this:
    Code:
        if @opponent && (!pbIsSnagBall?(ball) || !battler.isShadow?)
          @scene.pbThrowAndDeflect(ball,1)
          pbDisplay(_INTL("The Trainer blocked the Ball!\nDon't be a thief!"))
        elsif MAPSCANNOTUSEPOKEBALLS.include?($game_map.map_id)
          @scene.pbThrowAndDeflect(ball,1)
          pbDisplay(_INTL("You cannot use Poké Balls here!"))
        else

    In your Settings script at the very top, add this:
    Code:
    MAPSCANNOTUSEPOKEBALLS = [1,2,3,4]
    These numbers, 1,2,3,4 are the Map IDs on which you cannot use Poké Balls.
    Reply With Quote
      #3    
    Old 1 Week Ago (5:36 PM).
    _Lendaryo_'s Avatar
    _Lendaryo_ _Lendaryo_ is offline
       
      Join Date: Aug 2017
      Location: Brasil
      Gender: Male
      Nature: Serious
      Posts: 34
      The script is edited, but I think I get it. Thank you for your help!
      Reply With Quote
      Reply

      Quick Reply

      Join the conversation!

      Create an account to post a reply in this thread, participate in other discussions, and more!

      Create a PokéCommunity Account

      Sponsored Links
      Thread Tools

      Posting Rules
      You may not post new threads
      You may not post replies
      You may not post attachments
      You may not edit your posts

      BB code is On
      Smilies are On
      [IMG] code is On
      HTML code is Off

      Forum Jump


      All times are GMT -8. The time now is 4:44 AM.