• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Remove a Pokemon for a while.

Hello friends.

I write to ask a question. I tried to figure out how to get the following, but the truth, I have not been very successful. Perhaps some of you had better luck. Well, here I go.

Suppose I have a party of Pokemon and from one moment to another... as a result of an event... one of my Pokemon is no longer on my team until something else happens.

For example, someone stole one of my Pokemon. Then I look up to find him somewhere on the map and then rejoins to the party without altering its characteristics... their attacks, levels, parameters... etc.

Is there a way?

Thank you for all the help.
 
Last edited by a moderator:
I don't know if it'll work on your version of essentials or not, but this is what I used for events, and it works just fine.

#HOW TO TEST PROPERLY#

#First giving a pokemon
#Second saving the party
#Third giving a different pokmeon
#Fourth restoring the party

#END#

#Going to the past:
#savecurrentPokemon(123)

#If you've been before:
#savecurrentPokemon(123)
#restorepastPokemon(124)

#If going back to the future:
#savepastPokemon(123)
#restorecurrentPokemon(124)

#If going back to the future for the last time:
#savepastPokemon(123)
#addpastandFuture(123, 124)

def savecurrentPokemon(variable)
$game_variables[variable] = $Trainer.party
$Trainer.party = []
end
def restorecurrentPokemon(variable)
$Trainer.party = $game_variables[variable]
end
def savepastPokemon(variable)
$game_variables[variable] = $Trainer.party
$Trainer.party = []
end
def restorepastPokemon(variable)
$Trainer.party = $game_variables[variable]
end
def addpastandFuture(pastvar, futurevar)
$Trainer.party = $game_variables[futurevar] + $game_variables[variable]
end

You can obviously adjust the variables used if they're in use already.
 
Back
Top