• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Multiple Protagonists with variables (version 16.2)

  • 48
    Posts
    5
    Years
    • Seen Oct 17, 2023
    I was trying to make a Multiple Protagonists using variables. Basically it's a kidnapping scene, then I'm only going to use a single character once.Then I'm creating a separate character.

    There are many things that go great for me. But others that I don't know very well how to fix it.

    $PokemonBag
    Cannot be returned to the copy.

    Trainer.name
    For some reason he Modular Pause Menu did not return the original name directly (in trainercard yes)


    With solving the bag issue it would be really great.

    I put everything I carry
    [PokeCommunity.com] Multiple Protagonists  with variables (version 16.2)


    Code:
     def pbGEN
      if$game_variables[37]= $Trainer.party.clone
        $game_variables[38]= $Trainer.name.clone
        $game_variables[39]= $PokemonBag.clone
        $game_variables[40]= $Trainer.badges.clone
       
        # Badges
        $Trainer.badges[5]= true
        $Trainer.badges[4]= true
        $Trainer.badges[3]= true
        $Trainer.badges[2]= true
        $Trainer.badges[1]= true
        $Trainer.badges[1]= true
    
        
        # Trainer
        $Trainer.name=("David")  # Not clone
        pbChangePlayer(2)
       
        # Bag
        $PokemonBag.pbStoreItem(:POTION,5)
        $PokemonBag.clear # Not clone
    
        
        # Team
        $Trainer.party.clear
        poke1=PokeBattle_Pokemon.new(:ARCANINE,25,$Trainer)
        poke1.ot="Sonata"
        poke1.setItem(:LEFTOVERS)
        poke1.setNature(:ADAMANT)
        poke1.setAbility(1)
        poke1.makeMale
        poke1.makeShiny
        pbAddPokemonSilent(poke1)
    
        poke2=PokeBattle_Pokemon.new(:MUK,25,$Trainer)
        poke2.setItem(:LEFTOVERS)
        pbAddPokemonSilent(poke2)
        pbWait(1)
    
     end
    end
     
    Last edited:
    I really did not know this, it is more comfortable like this,
    Now I'm figuring out how to get back to the original player.

    Thank you, I really didn't know
     
    Back
    Top