Ekran tytułowy i kilka pytań.
Aktualny czas: 19-11-26, 00:43 Witaj! Przejdź do zakładki Logowanie lub Rejestracja

To była dobra przygoda. Dziękujemy!
Po wielu wspólnych latach Ultima Forum przechodzi w tryb archiwalny.
Zostawiamy je tutaj takim, jakie stworzyliśmy je razem,
z tysiącami postów, projektów, porad, skryptów i wspomnień.
Dziękujemy każdemu, kto był częścią Ultimy.


Wątek zamknięty 
[VXAce] Ekran tytułowy i kilka pytań.
arturretke Offline
*


Liczba postów: 5
Dołączył: 26-06-15

Pomógł: 0



Post: #7
RE: Ekran tytułowy i kilka pytań.

Na początek mam jednak jeszcze pytanie.
Posiadam skrypt oferujący możliwość dodania własnego logo przed właściwym ekranem tytułowym. Wygląda tak:

#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  # Splash Settings Hash
  SPLASH_SETTINGS = {
  # First Splash Image (Simple Fade in and Fade out with infinite duration)
  1 => {:name => "Splash1", :fadein => 20, :fadeout => 0, :duration => 300,
        :skippable => false, :centered => true, :end_wait => 0},

  # Second Splash Image (Sound with Fade in and Fade out with limited duration)
  2 => {:name => "Splash2", :fadein => 0, :fadeout => 20, :duration => 300,
        :skippable => false, :centered => true}
  }
  # Show Flash when returning to the title from the game
  RETURN_SPLASH_SHOW = false
  # Show on Play Test
  SHOW_ON_PLAYTEST = true #false
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_splash_screen_scene_title_initialize                   initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize  
    # Start Splash Intro
    start_splash_intro  
    # Run Original Method
    tds_splash_screen_scene_title_initialize
  end
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start_splash_intro
    # Return if Show on Play Test is false
    return if $TEST and !SHOW_ON_PLAYTEST
    # Fadeout Screen
    Graphics.fadeout(0)  
    # Dispose of SceneManager Background Bitmap if it's not nil
    SceneManager.background_bitmap.dispose if !SceneManager.background_bitmap.nil?
    # Return if Return Flash Show is false and Stack is not empty
    return if !RETURN_SPLASH_SHOW and !SceneManager.instance_variable_get(:@stack).empty?  
    # Display Splash Images
    SPLASH_SETTINGS.keys.sort.each {|i| display_splash_image(SPLASH_SETTINGS[i])}
  end
  #--------------------------------------------------------------------------
  # * Display Splash Image
  #     settings : splash image settings
  #--------------------------------------------------------------------------
  def display_splash_image(settings)
    # Return if settings are nil
    return if settings.nil?
    # Make Splash Image Sprite
    @splash_image = Sprite.new
    # Make Splash Image Bitmap
    @splash_image.bitmap = Cache.picture(settings[:name])
    # Center Sprite if Applicable
    center_sprite(@splash_image) if settings[:centered]
    # Fade In
    Graphics.fadein(settings[:fadein])  
    # If Start SE
    if settings[:start_SE]
      # Sound Effect Args
      se_args = settings[:start_SE].dup
      # Add Folder Location to SE Name
      se_args[0] = 'Audio/SE/' + settings[:start_SE][0]
      # Play SE if Applicable
      Audio.se_play(*se_args)      
    end
  
    # If Start ME
    if settings[:start_ME]
      # Sound Effect Args
      me_args = settings[:start_ME].dup
      # Add Folder Location to SE Name
      me_args[0] = 'Audio/ME/' + settings[:start_ME][0]
      # Play SE if Applicable
      Audio.me_play(*me_args)      
    end  
  
    # If Duration is Infinite
    if settings[:duration].is_a?(Float) and settings[:duration].infinite?    
      # Duration Wait
      loop do
        # Update Basic Components
        update_basic
        # Break if Input Trigger C or B
        break if Input.trigger?(:C) or Input.trigger?(:B)
      end
    else
      # Duration Wait
      settings[:duration].times do
        # Update Basic Components
        update_basic
        # Break if Skippable and Input Trigger C or B
        break if settings[:skippable] and Input.trigger?(:C) or Input.trigger?(:B)
      end
    end  
    # Fadeout
    Graphics.fadeout(settings[:fadeout])
    # After Splash Image Display Delay
    settings[:end_wait].times do update_basic end if settings[:end_wait]
    # Stop SE and ME sounds
    RPG::SE.stop ; RPG::ME.stop
    # Dispose of Splash Image
    @splash_image.dispose ; @splash_image = nil
  end
end

Jak wpasować ten skrypt, który podałeś na ominięcie menu podstawowego, żeby nie kolidował z powyższym? Chodzi mi o to, by dwa obrazki przed-tytułowe, które dodałem, zostały, a zaraz po nich było moje własne menu.
29-06-15 13:44
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
Wątek zamknięty 


Wiadomości w tym wątku
RE: Ekran tytułowy i kilka pytań. - arturretke - 29-06-15 13:44

Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości

Kontakt | Ultima Forum | Wróć do góry | Wróć do forów | Wersja bez grafiki | RSS
Powered By MyBB. © 2013 MyBB Group. All Rights Reserved.
Skórka by Ayene.