• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

163
Posts
7
Years
    • Seen today
    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:

    thepsynergist

    Vinemon: Sauce Edition Programmer and Composer
    795
    Posts
    15
    Years
  • 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.
     
    163
    Posts
    7
    Years
    • Seen today
    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.



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

    ¡Excelent! I'm going to try this and then i tell oyu how was going!!

    Thank you so much :D
     
    Back
    Top