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

[Question] Restricting Options In Battle?

  • 311
    Posts
    5
    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.
     
    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! :)
     
    Back
    Top