• 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] Simple Help (Check All Fainted)

107
Posts
3
Years
    • Seen Apr 27, 2023
    I have an autosave script, it saves everything really well. If, during the battle, the player closes the game in order not to save a defeat, he causes a save in the game, but when starting, the player appears with all the Pokemons passed out in the same place that lost the game.

    So if you have any encounters with wild Pokemons it will crash the game.

    I would like the game to check every time at startup if all the Pokemons are passed out, if so, teleport to the Pokemon Center.
     
    124
    Posts
    3
    Years
  • In v19, you can check if all the player's Pokémon are fainted using $Trainer.all_fainted? (returns true if there are no usable Pokémon in the player's party).
     
    Back
    Top