• 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] Help with scripting form change ability!

  • 1
    Posts
    3
    Years
    Hello! I've never asked any questions here before so idk if I'm doing this right but I need a little help with my Essentials fangame, in particular, scripting an ability that changes my Pokémon's form. I've never made a fangame before and only have very basic C# experience so I really don't know what I'm doing here.

    So the object of this script in Battle_AbilityEffects is to give my Pokémon, Lopot, an ability where when it gets hit by anything, it changes form.

    Here is what I came up with after scouring other similar abilities and the essentials docs wiki:

    Battle::AbilityEffects::OnBeingHit.add(:POTTED
    proc { |ability, user, target, move, battle|
    battler.form != 1
    }
    )


    Could someone in the Essentials community who is familiar with battle scripting help a pal out? Many thanks to the kind, beautiful, and generous soul who helps out, that is, if anyone does. :D
     
    Look up Mimikyu's Disguise ability as it has the same trigger. You can base your ability on that.
     
    Back
    Top