• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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
    11
    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:
    in which line I can find this?

    Do you know about CTRL+SHIFT+F (search tool)? Also, this thread is 2014 , maybe mej71 used v15~17 and you need to adapt his script for your fan-game.
     
    I am using essentials V17.2 any idea how to adapt?
     
    Last edited:
    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