• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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