• 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] Adding Switches in Pokemon starter selection script

Blake7

To Ignite all people within our nation
  • 49
    Posts
    8
    Years
    • Seen Nov 30, 2018
    I need help adding 3 switches in the starter selection script by shiney570.
    Each switch should be only enabled because selecting that certain pokemon.
    where do i ad $game_switches[ID] = true/false in this script for each pokemon selection.
     
    I just want to mention that the script saves the selection into $ game_variables [7], which is the starter variable (1 = first pokemon, 2 = second pokemon, 3 = third pokemon).
    The selected pokemon is set in a variable, so you can't just look for a set function for all three pokemon either.

    If you're set on switches, you can make a case block. After$game_variables[7]=@select, add this:
    Code:
    case @select
    when 1
      $game_switches[ID1] = true
    when 2
      $game_switches[ID2] = true
    else
      $game_switches[ID3] = true
    end
     
    I just want to mention that the script saves the selection into $ game_variables [7], which is the starter variable (1 = first pokemon, 2 = second pokemon, 3 = third pokemon).
    The selected pokemon is set in a variable, so you can't just look for a set function for all three pokemon either.

    If you're set on switches, you can make a case block. After$game_variables[7]=@select, add this:
    Code:
    case @select
    when 1
      $game_switches[ID1] = true
    when 2
      $game_switches[ID2] = true
    else
      $game_switches[ID3] = true
    end

    Thanks it works!
    The reason am using switches is because i am using the pokeballs machine as an OW event and its much simpler to make the pokeball dissappear accordingly. :)
     
    Back
    Top