• 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.

How do I remove Pokémon?

Marohak

Asker of Dumb Questions
  • 25
    Posts
    11
    Years
    I'm writing an event, where a thug steals your Pokémon.

    I want to remove all Pokémon, except the first Pokémon.

    And also, if the player has only one Pokémon, I want a separate event to occur.

    Any suggestions?
     
    I've had a look, but I don't fully understand which script in supposed to use and how.

    Was hoping to get some clarity here.
     
    This way is long, but requires no scripting knowledge, just basic understanding of variables and Essentials commands... Which I assume you know about.

    Create up to 5 variables (let's say 51-55 for this examples sake).
    then in the event, have it call this:
    Code:
    game_variables[51]=$Trainer.party[1]
    game_variables[52]=$Trainer.party[2]
    game_variables[53]=$Trainer.party[3]
    game_variables[54]=$Trainer.party[4]
    game_variables[55]=$Trainer.party[5]
    At which point, you'll want to remove any Pokémon after position 1, so use:
    Code:
    $Trainer.party.delete_at(5)
    $Trainer.party.delete_at(4)
    $Trainer.party.delete_at(3)
    $Trainer.party.delete_at(2)
    $Trainer.party.delete_at(1)
    You'll be left with 1 Pokémon and your other 5 will be stolen lol.
    Remember though... You'll want to check a Pokémon exists in each of the positions, otherwise you will receive an error... So you SHOULD, have it look like this:
    Code:
    Conditional Branch: Trainer.party.length>5
    Script:             $Trainer.party.delete_at(5)
    end
    Conditional Branch: Trainer.party.length>4
    Script:             $Trainer.party.delete_at(4)
    end
    And you get the idea with that.
    To recall your team, do this again, somewhat, in reverse... Minus a few steps.
     
    Back
    Top