• 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] Changing a pokemon's form via a status condition

1
Posts
328
Days
    • 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.
     
    22
    Posts
    365
    Days
    • Seen May 2, 2024
    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