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

Set transition for next battle

1,224
Posts
10
Years
  • In PokemonField, find the line
    Code:
    if Sprite.method_defined?(:wave_amp) && rand(15)==0

    Change this to
    Code:
    if $game_variables[XX]!=nil && $game_variables[XX]!=0 && $game_variables[XX] !="" #force chosen transition
    #variable is initially set as 0 when you start the game, must check for this
             Graphics.freeze
             viewport.color=Color.new(0,0,0,255)
             Graphics.transition(50,sprintf("Graphics/Transitions/%s",$game_variables[XX]))
          $game_variables[XX]=""
        elsif Sprite.method_defined?(:wave_amp) && rand(15)==0

    XX must be a game variable number.

    Put this method above the main
    Code:
    def pbNextTransition(transition)
    return if !(transition.is_a?(String))
    $game_variables[XX]=transition
    end

    Call this to change the transition. If you set it to an invalid transition name, it will not do one (besides the flashing thing it does for all of them). You could also use this to purposefully have no transition.
    XX should be the same game variable number. Variable will reset after the next occuring battle.
     
    Last edited:
    25
    Posts
    4
    Years
    • Seen Aug 25, 2020
    I am using essentials V17.2 any idea how to adapt?
     
    Last edited:
    1
    Posts
    3
    Years
    • Seen May 22, 2023
    In PokemonField, find the line
    Code:
    if Sprite.method_defined?(:wave_amp) && rand(15)==0

    Change this to
    Code:
    if $game_variables[XX]!=nil && $game_variables[XX]!=0 && $game_variables[XX] !="" #force chosen transition
    #variable is initially set as 0 when you start the game, must check for this
             Graphics.freeze
             viewport.color=Color.new(0,0,0,255)
             Graphics.transition(50,sprintf("Graphics/Transitions/%s",$game_variables[XX]))
          $game_variables[XX]=""
        elsif Sprite.method_defined?(:wave_amp) && rand(15)==0

    XX must be a game variable number.

    Put this method above the main
    Code:
    def pbNextTransition(transition)
    return if !(transition.is_a?(String))
    $game_variables[XX]=transition
    end

    Call this to change the transition. If you set it to an invalid transition name, it will not do one (besides the flashing thing it does for all of them). You could also use this to purposefully have no transition.
    XX should be the same game variable number. Variable will reset after the next occuring battle.

    it was not very clear in your explanation how to do this. my essentials is the v15 i managed to put without giving error but the part that refers to variables was not very clear for those who are reading. and also the part that said "call this to change the transition" how to call? could you explain it better? call script? how to put the text in the script call event?
     
    Back
    Top