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

[Eventing Question] 1v1 Lucario Fight

83
Posts
5
Years
    • She/It/Mew
    • Seen Feb 22, 2023
    For context, I'm making a sort of Pokemon Z version, and i want to make the Successor Korrina fight, but idk how to make it so that you only can use Lucario. I know how to get it to check your party, but i want it so that you can only bring Lucario. How do I make it so that the event forbids continuation if you have anything more?
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    For context, I'm making a sort of Pokemon Z version, and i want to make the Successor Korrina fight, but idk how to make it so that you only can use Lucario. I know how to get it to check your party, but i want it so that you can only bring Lucario. How do I make it so that the event forbids continuation if you have anything more?

    You can do something with the functoin pbChooseAblePokemon.
    Something like this seems to work:
    Code:
    scene = PokemonParty_Scene.new
    screen = PokemonPartyScreen.new(scene,$Trainer.party)
    ret = screen.pbChooseAblePokemon(proc { |pkmn| return pkmn.isSpecies?(:LUCARIO)})
    Insert this in an Event, and the result "ret" will contain the index of Lucario in the screen (or be -1 if you cancel without selecting Lucario).

    EDIT: I forgot to say: then store the team somewhere, and set the trainer team to only contain Lucario
    Code:
    scene = PokemonParty_Scene.new
    screen = PokemonPartyScreen.new(scene,$Trainer.party)
    ret = screen.pbChooseAblePokemon(proc { |pkmn| return pkmn.isSpecies?(:LUCARIO)})
    if ret > -1
      $game_variables[XXX] = [pk for pk in $Trainer.party]
      $Trainer.party = [$Trainer.party[ret]]
    end

    and then, when you're done, give the complete team back:
    Code:
    $Trainer.party = $game_variables[XXX]
    $game_variables[XXX] = nil
     
    Last edited:

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    Essentials V19 was released on April 27th, so no, this is for V18.
     
    Back
    Top