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

Script that heals only HP?

39
Posts
17
Years
    • Seen Feb 28, 2024
    I'm sure it's not too complex, but I'm looking to see if there is a way to make a new script that heals only your health, and not PP or status effects. Thanks.
     

    Derxwna Kapsyla

    Derxwna "The Badman" Kapsyla
    437
    Posts
    12
    Years
  • If I was doing it, I would look up the code to see how Potions work, and examine it to see what determines their ability to heal only HP. Then, apply that method to an individual event by having it call the script function I suppose. I have no idea if this will work, and someone else would probably know. It doesn't hurt to try, though.
     

    Luka S.J.

    Jealous Croatian
    1,270
    Posts
    15
    Years
  • Code:
    $Trainer.party[x].hp=$Trainer.party[x].totalhp

    Where X would be your Pokemon slot number (from 0 to 5)

    Code:
    def pbHealPartyHP
      for i in 0...$Trainer.party.length
        $Trainer.party[i].hp=$Trainer.party[i].totalhp
      end
    end

    Or use the example code I just wrote above.
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    $Trainer.party[x].hp+=20
    $Trainer.party[x].hp-=20
    $Trainer.party[x].hp=$game_variables[999]
    $Trainer.party[x].hp+=$game_variables[999]
    $Trainer.party[x].hp-=$game_variables[999]

    x = 0,1,2,3,4 or 5

    See a pattern here, all pretty much works the same way
     
    Back
    Top