• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Eventing Question] Remove all Pokémon from party

  • 7
    Posts
    6
    Years
    • Seen Dec 12, 2018
    Hello guys!

    I'm trying to make an event in which I receive a Pokémon to catch another 3... After that, I want to remove all of them from the party (so I'll have no Pokémon left).

    Does anyone know a way to do it?
     
    The script $Trainer.party.delete_at(index), where "index" is the spot in the player's party, will let you delete even the player's last able pok?mon.
    You could set up the script as:
    Code:
    for i in 0...$Trainer.party.length
         $Trainer.party.delete_at(i)
    That should do it.
     
    Last edited:
    The script $Trainer.party.delete_at(index), where "index" is the spot in the player's party, will let you delete even the player's last able pok?mon.
    You could set up the script as:
    Code:
    for i in 0...$Trainer.party.length
         $Trainer.party.delete_at(i)
    That should do it.

    Basically, I'll have to create a new script line on the script section and put the code, than I'd have to to call it on the event?
    I'm not so good at scripting so, I don't know if I got it right.
    if you could send my pictures, it'd help me a lot!
     
    Basically, I'll have to create a new script line on the script section and put the code, than I'd have to to call it on the event?

    No, you can use the script I just wrote in the event. If you haven't added a script like to an event before, it's the very last option on the third tab.
     
    No, you can use the script I just wrote in the event. If you haven't added a script like to an event before, it's the very last option on the third tab.

    Thanks for the help! It's working great.
    xD
     
    • Like
    Reactions: Poq
    Back
    Top