The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old January 17th, 2013 (09:22 AM).
Peeky Chew's Avatar
Peeky Chew
Master of Palettes
 
Join Date: Sep 2009
Location: Great Britain
Age: 20
Gender: Male
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
  #2    
Old January 18th, 2013 (08:52 AM).
andytu's Avatar
andytu
Ditto engine developer
 
Join Date: Jan 2011
Gender: Male
With this line: if Input.trigger?(Input::LEFT) && @partyindex>0
You need to get rid of the "&& @partyindex>0" bit, since this is causing it to ignore a left press if we're on the first pokemon. Then check the pbGoToPrevious script and where it manipulates @partyindex you can set it to go wherever you need.

Similar with this line: if Input.trigger?(Input::RIGHT) && @partyindex<@party.length-1
And you'll need to edit pbGoToNext for that one.

However this used to cause problems with pokemon cries, so unless you need to I wouldn't bother :/
Reply With Quote
  #3    
Old January 18th, 2013 (01:26 PM).
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
To make the summary pages for a given Pokémon loop round, you'll want to edit the lines which change the value of @page, namely replace each set of 3 lines with the following:

Code:
Up:
    @page-=1
    @page+=5 if @page<0

Down:
    @page+=1
    @page-=5 if @page>=5
5 is the number of summary pages.

As for looping the selection of Pokémon, you'd need to do what andytu says. This would be more difficult to do (technically, not necessarily conceptually).
__________________
Reply With Quote
Reply
Quick Reply

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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 08:38 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.