• 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!
  • 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] Mega Evolve When hp is 50% or below?

  • 8
    Posts
    9
    Years
    • Seen Nov 15, 2016
    I Don't Know The Hp Script is.. so i kinda need help..

    Code:
    MultipleForms.register(:something,{
    "getMegaForm"=>proc{|pokemon|
       next 1 if isConst?(pokemon.item,PBItems,:something) & (Insert Hp Script % here)
       next
     
    You could also try using this @hp<=((@totalhp/2).floor) referring to the battle.

    I think pokemon.hp<=pokemon.totalhp/2 is referring to the Pokemon in party? tell me if I'm wrong please.
     
    Last edited by a moderator:
    I think pokemon.hp<=pokemon.totalhp/2 is referring to the Pokemon in party? tell me if I'm wrong please.

    No, it refers to the thing that's inputted into the function. Notice that it checks for the item using pokemon.item
     
    Back
    Top