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

[Scripting Question] Essentials 1.18.1 - Show picture with a script.

  • 15
    Posts
    3
    Years
    • Seen Dec 15, 2021
    Hi all of you!

    You will see. I am trying to modify the following script so that while the game is accelerated, an image is displayed on the screen, above the game layer itself but below the menus. Just like in Pokémon Insurgence!

    Code:
    #==============================================================================#
    #                         Better Fast-forward Mode                             #
    #                                   v1.0                                       #
    #                                                                              #
    #                                 by Marin                                     #
    #==============================================================================#
    #                                   Usage                                      #
    #                                                                              #
    # SPEEDUP_STAGES are the speed stages the game will pick from. If you click F, #
    # it'll choose the next number in that array. It goes back to the first number #
    #                                 afterward.                                   #
    #                                                                              #
    #             $GameSpeed is the current index in the speed up array.           #
    #   Should you want to change that manually, you can do, say, $GameSpeed = 0   #
    #                                                                              #
    # If you don't want the user to be able to speed up at certain points, you can #
    #                use "pbDisallowSpeedup" and "pbAllowSpeedup".                 #
    #==============================================================================#
    #                    Please give credit when using this.                       #
    #==============================================================================#
    
    PluginManager.register({
      :name => "Better Fast-forward Mode",
      :version => "1.1",
      :credits => "Marin",
      :link => "https://reliccastle.com/resources/151/"
    })
    
    # When the user clicks F, it'll pick the next number in this array.
    SPEEDUP_STAGES = [1,2]
    
    
    def pbAllowSpeedup
      $CanToggle = true
    end
    
    def pbDisallowSpeedup
      $CanToggle = false
    end
    
    # Default game speed.
    $GameSpeed = 0
    $frame = 0
    $CanToggle = true
    
    module Graphics
      class << Graphics
        alias fast_forward_update update
      end
      
      def self.update
        if $CanToggle && Input.trigger?(Input::ALT)
          $GameSpeed += 1
          $GameSpeed = 0 if $GameSpeed >= SPEEDUP_STAGES.size
        end
        $frame += 1
        return unless $frame % SPEEDUP_STAGES[$GameSpeed] == 0
        fast_forward_update
        $frame = 0
      end
    end
    
    module Input
      class << Input
        alias fast_forward_button_to_key buttonToKey
      end
      
      F = 50
      
      def self.buttonToKey(btn)
        return [0x46] if btn == Input::F
        fast_forward_button_to_key(btn)
      end
    end

    Is it possible?
     
    Back
    Top