View Single Post
  #1    
Old January 17th, 2013 (09:22 AM).
Peeky Chew's Avatar
Peeky Chew Peeky Chew is offline
Master of Palettes
Crystal Tier
 
Join Date: Sep 2009
Location: Great Britain
Age: 21
Gender: Male
Posts: 852
When in the Pokémon summary screen and scrolling between the different pages or Pokémon, it stops when you get to the last one and you have to go in the opposite direction to get back. I was wondering if it'd be possible to make it scroll infinitely in either direction instead?

I think this is all of the right code:
Code:
  def pbScene
    pbPlayCry(@pokemon)
    loop do
      Graphics.update
      Input.update
      pbUpdate
      if Input.trigger?(Input::B)
        break
      end
      dorefresh=false
      if Input.trigger?(Input::C)
        if @page==0
          break
        elsif @page==3
          pbMoveSelection
          dorefresh=true
          drawPageFour(@pokemon)
        end
      end
      if Input.trigger?(Input::LEFT) && @partyindex>0
        pbGoToPrevious
        @pokemon=@party[@partyindex]
        @sprites["pokemon"].setPokemonBitmap(@pokemon)
        if @pokemon && (@pokemon.isShadow? rescue false)
          @sprites["pokemon"].color=Color.new(192,0,255,128)
        else
          @sprites["pokemon"].color=Color.new(0,0,0,0)
        end
        pbPositionPokemonSprite(@sprites["pokemon"],104,128)
        dorefresh=true
        pbPlayCry(@pokemon)
      end
      if Input.trigger?(Input::RIGHT) && @partyindex<@party.length-1
        pbGoToNext
        @pokemon=@party[@partyindex]
        @sprites["pokemon"].setPokemonBitmap(@pokemon)
        if @pokemon && (@pokemon.isShadow? rescue false)
          @sprites["pokemon"].color=Color.new(192,0,255,128)
        else
          @sprites["pokemon"].color=Color.new(0,0,0,0)
        end
        pbPositionPokemonSprite(@sprites["pokemon"],104,128)
        dorefresh=true
        pbPlayCry(@pokemon)
      end
      if Input.trigger?(Input::UP) && !@pokemon.egg?
        oldpage=@page
        @page-=1
        @page=0 if @page<0
        @page=4 if @page>4
        dorefresh=true
        if @page!=oldpage # Move to next page
          pbPlayCursorSE()
          dorefresh=true
        end
      end
      if Input.trigger?(Input::DOWN) && !@pokemon.egg?
        oldpage=@page
        @page+=1
        @page=0 if @page<0
        @page=4 if @page>4
        if @page!=oldpage # Move to next page
          pbPlayCursorSE()
          dorefresh=true
        end
      end
      if dorefresh
        case @page
          when 0
            drawPageOne(@pokemon)
          when 1
            drawPageTwo(@pokemon)
          when 2
            drawPageThree(@pokemon)
          when 3
            drawPageFour(@pokemon)
          when 4
            drawPageFive(@pokemon)
        end
      end
    end
    return @partyindex
  end
end
__________________



Demo Beta out Now!

Reply With Quote