• Benvenuto in Making Videogames!
  • Dai sfogo alla tua fantasia!
  • Crea il tuo Videogioco!
Benvenuto ospite! Login Registrati




Valutazione discussione:
  • 0 voto(i) - 0 media
  • 1
  • 2
  • 3
  • 4
  • 5
Come inserire un video o un intro prima del menu ?? :)
#1
Ciao a tutti io uso il programma Rpg maker XV Ace, se qualcuno di voi conosce un modo per inserire un intro prima del menu(vorrei mettere un video della "casa di produzione") o anche dei video durante il gioco per spiegare la storia, me lo potrebbe spiegare please Smile
 
Rispondi
#2
Allora non ho mai provato vx ace però forse ti posso essere d'aiuto.
Introduzione
Questo script ti permette di aggiungere un logo, più un video o uno slideshow come intro prima del titolo di gioco.

Istruzioni:

LOGO
Attiva/disattiva la schermata del logo. (true = attivo)

LOGOTIME
Rappresenta la durata del logo in secondi.

MODE
Imposta1 per lo slideshow, 2 per il video (ogg/theora movie)

PICTURES
Lista di immagini da mostrare in sequenza nello slideshow. (contenute nella cartella Graphics/Intro/)

PICTIME
Tempo di visualizzazione per ciascuna immagine.

VIDEO
File del video. (contenuto nella cartella Graphics/Intro/)

INTROMUSIC (Eseguita solo in modalità Slideshow!)
File della musica. (contenuto nella cartella Graphics/Intro/)

Script:
[spoiler]
Codice:
#===============================================================================
# Scene Intro 1.0 - 06/04/2012
#-------------------------------------------------------------------------------
# First of all, as anybody can see this script is heavily based on moghunter
# Animated Title Screen.
#-------------------------------------------------------------------------------
# This scripts allows to add a slideshow or a movie as intro before the title
# screen is shown.
#-------------------------------------------------------------------------------
# INSTRUCTIONS
#
# LOGO
#   Toggles Logo screen ON/OFF (true = on)
#
# LOGOTIME
#   Represents Logo duration in seconds.
#
# MODE
#   Sets 1 for slideshow, 2 for video (ogg/theora movie)
#
# PICTURES
#   Array of pictures showed in the slideshow. (put in Graphics/Intro/ folder)
#
# PICTIME
#   Each picture display duration.
#
# VIDEO
#   Video's filename. (put in Graphics/Intro/ folder)
#
# INTROMUSIC  (played only in Slideshow Mode!)
#   Intro music filename (put in Graphics/Intro/ folder)
#===============================================================================

#-------------------------------------------------------------------------------
# CONFIGURE
#-------------------------------------------------------------------------------
module INTRO

  LOGO = true
  LOGOTIME = 2 #seconds
  MODE = 1 #1=slideshow 2=video
  PICTURES = ["Intro0","Intro1","Intro2","Intro3"] #Graphics/Intro
  PICTIME = 3 #seconds
  VIDEO = "video" #Graphics/Intro
  INTROMUSIC = "Intro" #Audio/BGM/Intro

end #module INTRO

#-------------------------------------------------------------------------------
# SCENE MANAGER
#-------------------------------------------------------------------------------
module SceneManager

  def self.first_scene_class
    $BTEST ? Scene_Battle : Scene_Intro
  end

end #module SceneManager

#-------------------------------------------------------------------------------
# CACHE
#-------------------------------------------------------------------------------
module Cache

  def self.intro(filename)
    load_bitmap("Graphics/Intro/", filename)
  end

end #module Cache

#-------------------------------------------------------------------------------
# SCENE INTRO
#-------------------------------------------------------------------------------
class Scene_Intro < Scene_Base
include INTRO

  def start
    super
    SceneManager.clear
    @phase = 1
    @phase_time = -1
    if LOGO
      create_logo
    else
      start_intro
    end
    #play_intro_music unless LOGO
  end

  def start_intro
    if MODE == 1 #Play Slideshow
      create_sshow
      play_intro_music
    else #Play Movie
      Graphics.play_movie('Graphics/Intro/Intro.ogg')
      SceneManager.goto(Scene_Title)
    end
    
  end

  def create_logo
     @phase = 0
     @logo = Sprite.new
     @logo.bitmap = Cache.intro("Logo")
     @logo.opacity = 0
     @logo_duration = 180 + (LOGOTIME * 60)
  end
  
  def create_sshow
    @slide_duration = 120
    @old_pic_index = 0
    @sprite = Plane.new
    @sprite.opacity = 0
    change_picture(true)
  end

  def dispose_sshow
    @sprite.dispose
    @sprite = nil
  end

  def dispose_logo
    return unless LOGO
    @logo.bitmap.dispose
    @logo.dispose
  end  

  def update
    super
    update_logo
    update_initial_animation
    update_sshow if MODE == 1
  end

  def update_logo
    return if @phase != 0
    loop do
      break if  @logo_duration == 0
      execute_logo
      Graphics.update
    end
    start_intro
  end
      
  def update_initial_animation
    return if @phase != 1
    @phase_time -= 1 if @phase_time > 0
    if @phase_time == 0
       @phase = 2
       @phase_time = 30
    end
  end  

  def update_sshow
    return if PICTURES.size == 1
    @slide_duration -= 1
    if @slide_duration <= 0
       @sprite.opacity -= 5
    else
       @sprite.opacity += 5
    end  
    return if @sprite.opacity != 0
    change_picture
  end
  
  def execute_logo
    @logo_duration -= 1
    if @logo_duration > 120
      @logo.opacity += 5
    else
       @logo.opacity -= 5
    end
    if @logo.opacity <= 0
       @logo_duration = 0
       @phase = 1
    end    
  end

  def change_picture(initial = false)
    @slide_duration = [[60 * PICTIME, 9999].min, 60].max
    if @sprite.bitmap != nil
       @sprite.bitmap.dispose
       @sprite.bitmap = nil
    end
    @old_pic_index += 1 unless initial
    if @old_pic_index >= PICTURES.size
      SceneManager.goto(Scene_Title)
    else
      pic = PICTURES[@old_pic_index]    
      @sprite.bitmap = Cache.intro(pic)
    end
  end
                  
  def play_intro_music
    Audio.bgm_play('Audio/BGM/' + INTROMUSIC)
    RPG::BGS.stop
    RPG::ME.stop
  end

  def terminate
    super
    SceneManager.snapshot_for_background
    dispose_sshow if MODE == 1
    dispose_logo if LOGO
  end

end #class Scene_Intro < Scene_Base
[/spoiler]
 
Rispondi
  


Discussioni simili
Discussione Autore Risposte Letto Ultimo messaggio
  Inserire uno script linus8927 5 1,331 08-03-2014, 05:32 PM
Ultimo messaggio: war10hacker

Vai al forum:


Browsing: 1 Ospite(i)