- 119
- Posts
- 10
- Years
- Seen Sep 1, 2023
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:
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.
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:
Code:
if Input.trigger?(Input::B)
@selection=selection
return nil
end
[S-HIGHLIGHT]if Input.trigger?(Input::L)
#call function to switch box to the left
nextbox=(@storage.currentBox==0) ? @storage.maxBoxes-1 : @storage.currentBox-1
pbSwitchBoxToLeft(nextbox)
@storage.currentBox=nextbox
end
if Input.trigger?(Input::R)
#call function to switch box to the Right
nextbox=(@[email protected]) ? 0 : @storage.currentBox+1
pbSwitchBoxToRight(nextbox)
@storage.currentBox=nextbox
end[/S-HIGHLIGHT]
end
end
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.
Last edited: