In the game I'm working on, there is a part where you're captured, and you have to escape a structure without being caught. However, before escaping, you have to go retrieve your Pokémon, which were confiscated. So, while you are going to retrieve them, you shouldn't be able to see your party screen.
How do I go about doing this? I originally was going to remove all the Pokémon from the player's party, but I thought it would be easier to keep the player from seeing the party, while the Pokémon are still technically there.
commands[cmdPokemon=commands.length]=_INTL("Pokémon") if $Trainer.party.length>0
commands[cmdBag=commands.length]=_INTL("Bag") if !pbInBugContest?
commands[cmdPokemon=commands.length]=_INTL("Pokémon") if $Trainer.party.length>0 && !$game_switches
commands[cmdBag=commands.length]=_INTL("Bag") if !pbInBugContest? && !$game_switches
So when the switch 81 is on the pokémon menu won't shows, same switch 82 and bag.
Take a note that the pokémon side effects like increasing happiness at each 256 steps, hatch eggs and other effects still happen. You can access the pokémon menu by "Give" option in bag and using some items like potion (you probably noticed this). The item registered on F5 still works.