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

[Scripting Question] Changing a pokemon's form via a status condition

  • 1
    Posts
    2
    Years
    • Seen Jun 26, 2023
    So I'm helping do some coding for a friend and I keep running into an issue. Basically I want to make a Pokemon change its form depending on if it has a status condition or not, and then revert back once the status is gone. Like if the Pokemon was Poisoned, it would change its form for the duration of the Poison, and then revert back to its base form once Poison ended.

    I tried replicating Shaymin's code and the Pokemon changes form when it gets the status effect, but the Pokemon doesn't revert back to its original form once the status is healed.
     
    Have you tried basing the ability on Darmanitan hidden ability Zen mode instead? That ability changes the form of Darmanitan depending on how much HP it has at the end of the turn. That means that if darmanitan's hp goes below half it's maximum hp in a turn, it will change forms but will revert back the form in the next turn if the hp is healed above half it's maximum hp. If you copy everything of that ability and change the conditions to be state aflicted instead of hp, it should work.
     
    Back
    Top