• 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.

[Question] Restricting Options In Battle?

311
Posts
4
Years
  • Basically, I want to have a battle against a wild Pokemon, while the player doesn't have Pokemon. I've figured out most of it so far, but the one problem is I have to restrict the Fight Button, Pokemon button, and Run Button. Any ideas on how to do this? I want to only allow the player to use their bag option.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I think you need to create a new @mode, as we have inside 'PokeBattle_Scene' script:
    Code:
      def refresh(index,mode=0)
        self.bitmap.clear
        @mode=mode
        cmdarray=[0,2,1,3]
        case @mode
        when 1
          cmdarray=[0,2,1,4] # Use "Call"
        when 2
          cmdarray=[5,7,6,3] # Safari Zone battle
        when 3
          cmdarray=[0,8,1,3] # Bug Catching Contest
        end
        for i in 0...4
          next if i==index
          x=((i%2)==0) ? 0 : 126
          y=((i/2)==0) ? 6 : 48
          self.bitmap.blt(x,y,@buttonbitmap.bitmap,Rect.new(0,cmdarray[i]*46,130,46))
        end
        for i in 0...4
          next if i!=index
          x=((i%2)==0) ? 0 : 126
          y=((i/2)==0) ? 6 : 48
          self.bitmap.blt(x,y,@buttonbitmap.bitmap,Rect.new(130,cmdarray[i]*46,130,46))
        end
      end

    Then, put a new array, like:
    Code:
        case @mode
        when 1
          cmdarray=[0,2,1,4] # Use "Call"
        when 2
          cmdarray=[5,7,6,3] # Safari Zone battle
        when 3
          cmdarray=[0,8,1,3] # Bug Catching Contest
    ###
        when 4 
          cmdarray=[2] # I guess 2 is for Bag
        end
    ###

    A good start, huh? xD

    GL anyway! :)
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • No, sorry. Unfortunately you need to dig the script. Also, PokeCommunity has a Discord! Join with us, maybe someone there can help you tho :)
     
    Back
    Top