• 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!
  • 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 battle outcomes!

  • 20
    Posts
    3
    Years
    • Seen Dec 21, 2022
    I can't figure out how to make it so, after the first rival battle, the player won't run to the pokemon centre after defeat.

    I want them to be able to be healed by the rival afterwards instead. How can I go about this?
     
    In the function that lets you make a battle:

    Code:
    def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
                        doubleBattle=false, trainerPartyID=0, canLose=false, outcomeVar=1)

    set the canLose parameter to true.
     
    In the function that lets you make a battle:

    Code:
    def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
                        doubleBattle=false, trainerPartyID=0, canLose=false, outcomeVar=1)

    set the canLose parameter to true.

    Will this make it so just the one battle will end differently? I still want the rest to work as normal.
     
    Will this make it so just the one battle will end differently? I still want the rest to work as normal.
    The rest will work normally. Only this battle will not send you back to the Pokémon Center after the plaer loses. But you have to handle the healing (use $Trainer.heal_party in Essentials V19, or pbHealAll in Essentials v18) so that the player isn't stuck.
     
    Back
    Top