Super Simple Animated Title Screen: Smoother Transition?

Discussion in 'RGSS3 Script Requests' started by Tw0Face, Nov 18, 2019.

Thread Status:
Not open for further replies.
  1. Tw0Face

    Tw0Face Chief Executive Officer Veteran

    Messages:
    285
    Likes Received:
    307
    First Language:
    German
    Primarily Uses:
    RMVXA
    I'm using this script made by TheoAllen for RM Vx Ace to display more than one title screen. I just wanted to ask if someone could help me making the transition between the BGs more "smooth". My title pictures represent the transition from day to night, so it would be nice if they wouldn't change so abrupt. For example, it would be great if one BG fades out while the next BG fades in. Is this possible?

    Thanks in advance. :smile:

    Code:
    #===============================================================================
    # Super Simple Animated Title Screen
    # By: TheoAllen
    # EDIT: Tw0Face
    #-------------------------------------------------------------------------------
    # Getting tired of animated title screen that offers you a lot of things you
    # don't even need? And why not just use traditional frame per frame animation
    # background?
    #
    # This script is an answer for you
    #
    # Terms of Use
    # Free for commercial and non-commercial
    #===============================================================================
    module SSAnimTitle
     
      # Set the frame here. Note that it will ONLY change the title1. And will not
      # animate the border part (title2)
      BackGround = [
      "Traventor_Title1",
      "Traventor_Title2",
      "Traventor_Title3",
      "Traventor_Title4",
      "Traventor_Title5",
      ]
     
      # Frame rate. Higher = slower
      Rate = 180
    end
    #===============================================================================
    # End of config
    #===============================================================================
    module Cache
      def self.dispose(path)
        @cache[path].dispose if @cache[path] && !@cache[path].disposed?
      end
    end
    
    class Scene_Title
     
      alias ss_anim_title_start start
      def start
        ss_anim_title_start
        precache_animation
        @count = 0
        #@bg_index = 0
        if @bg_index != nil then
          @bg_index -= 1
          refresh_bg
        else 
          @bg_index = 0
        end
      end
     
      def precache_animation
        SSAnimTitle::BackGround.each do |name|
          Cache.title1(name)
        end
      end
     
      alias ss_anim_title_update update
      def update
        ss_anim_title_update
        @count += 1
        refresh_bg if @count % SSAnimTitle::Rate == 0
      end
     
      def refresh_bg
        @bg_index += 1
        @bg_index %= SSAnimTitle::BackGround.size
        @sprite1.bitmap = Cache.title1(SSAnimTitle::BackGround[@bg_index])
        center_sprite(@sprite1)
      end
     
      alias ss_anim_title_terminate terminate
      def terminate
        ss_anim_title_terminate
        SSAnimTitle::BackGround.each do |name|
          Cache.dispose("Graphics/Titles1/" + name)
        end
      end
    end
     
    #1
  2. Tw0Face

    Tw0Face Chief Executive Officer Veteran

    Messages:
    285
    Likes Received:
    307
    First Language:
    German
    Primarily Uses:
    RMVXA
    *push
     
    #2
  3. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,116
    Likes Received:
    10,722
    First Language:
    English
    Primarily Uses:
    RMVXA

    Tw0Face, please do not bump your topic unless it has been 72 hours later since your last post. You can review our forum rules here. Thank you.

     
    #3
  4. Tw0Face

    Tw0Face Chief Executive Officer Veteran

    Messages:
    285
    Likes Received:
    307
    First Language:
    German
    Primarily Uses:
    RMVXA
    @Kes Okay, I'm sorry.
     
    #4
  5. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,521
    Likes Received:
    3,774
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Tw0Face You asked for this topic to be closed, but I don't see that it has been solved. Did you solve it yourself? Did you decide you just don't want this anymore?
     
    #5
  6. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,914
    Likes Received:
    7,691
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV
    Closed at OP's request.
     
    #6
Thread Status:
Not open for further replies.

Share This Page