The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Create & Discover > Game Development > Scripts & Tutorials
Reload this Page Essentials Script Quickly switch Pokémon storage boxes with L and R buttons
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Thread Tools
Old November 6th, 2013 (8:24 AM). Edited November 6th, 2013 by Badhaas.
Badhaas's Avatar
Badhaas Badhaas is offline
Join Date: Jul 2013
Gender: Male
Posts: 118
As mentioned before in this post, I've made a small change to the Pokémon storage script a while back to allow switching between boxes with the L and R button (being Q and W on the keyboard respectively). I find this a very nice feature from the original games, and since it wasn't in essentials yet, I decided to code it myself.

How to implement
Go to the "PokemonStorage" script and find "def pbSelectBoxInternal(party)" then scroll down to the following code and add the highlighted section:
      if Input.trigger?(Input::B)
        return nil
      if Input.trigger?(Input::L)
        #call function to switch box to the left
        nextbox=(@storage.currentBox==0) ? @storage.maxBoxes-1 : @storage.currentBox-1
      if Input.trigger?(Input::R)
        #call function to switch box to the Right
        nextbox=(@[email protected]) ? 0 : @storage.currentBox+1
This should do the job. If there are any questions, feel free to ask. Any comments or feedback are welcome.

Optional Extra
In the "PokemonStorage" script search for the following line; "def pbSelectPartyInternal(party,depositing)", and do the same as above. This will allow box switching while in the party screen.

View my profile page for scripts/tutorials made by me, even ones which aren't posted yet.
Currently working on a demo for Tales from the Pokémon World (based on the World of Pokémon project)
Reply With Quote

Relevant Advertising!

Old July 14th, 2014 (3:06 PM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
Join Date: Sep 2010
Gender: Male
Posts: 1,620
The pokémon box sprites don't refresh correctly. For fixing this, put your changes before both lines 'if key>=0' and, after lines [email protected]=nextbox' (the four made with this change) add line 'key=0'.
Reply With Quote
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

Forum Jump

All times are GMT -8. The time now is 12:25 AM.

Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 The PokéCommunity™,
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 - 2016 The PokéCommunity / Poké
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.

Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.