AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  ConnexionConnexion  



Le deal à ne pas rater :
Jeux, jouets et Lego : le deuxième à -50% (large sélection)
Voir le deal

Partagez
 

 Press Start avant l'écran titre

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
blodangan
Va-nu-pieds Lv.4
Va-nu-pieds Lv.4
avatar


Masculin Inscrit le : 06/03/2011
Messages : 57

Press Start avant l'écran titre Empty
MessageSujet: Press Start avant l'écran titre   Press Start avant l'écran titre Icon_minitimeMar 27 Déc 2011 - 16:53

Voici un script permettant d'avoir à appuyer sur start (entrée ou barre d'espace) avant l'écran titre :

Code:

#------------------------------------------------------------------
# Press Start avant l'écran Titre RGSS3 (Rpg maker VX Ace)
#------------------------------------------------------------------
# De Blodangan
# Pour https://rpg-maker-vx.bbactif.com/
#------------------------------------------------------------------
module Blodangan
  module Press_Start
    
    # Quelle message afficher ?
    Message_Press_Start = "Press Start"
    
    # Afficher Le Titre du Jeu ? true = oui, false = non
    Afficher_Titre_Jeu = true
    
    # Nom de l'image du premier fond dans le dossier ...\Graphics\Titles1
    Fond1 = "Night"
    
    # Nom de l'image du deuxieme fond dans le dossier ...\Graphics\Titles2
    # laissez vide pour ne pas avoir de fond n°2
    Fond2 = ""
    
    # Nom de la musique à jouer, dans le dossier ...\Audio\BGM
    Musique_Press_Start = "Theme1"
    
  end
end
#==============================================================================
# ■ module SceneManager
#==============================================================================
module SceneManager
  
  #--------------------------------------------------------------------------
  # ● 最初のシーンクラスを取得
  #--------------------------------------------------------------------------
  def self.first_scene_class
    $BTEST ? Scene_Battle : Scene_Press_Start
  end
end

#==============================================================================
# ■ Window_PressStartCommand
#==============================================================================

class Window_PressStartCommand < Window_Command
  #--------------------------------------------------------------------------
  # Initialize
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0)
    update_placement
    self.openness = 0
    open
  end
  #--------------------------------------------------------------------------
  # Window Width
  #--------------------------------------------------------------------------
  def window_width
    return 160
  end
  #--------------------------------------------------------------------------
  # Update Placement
  #--------------------------------------------------------------------------
  def update_placement
    self.x = (Graphics.width - width) / 2
    self.y = (Graphics.height * 1.6 - height) / 2
  end
  #--------------------------------------------------------------------------
  # Maker Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_command(Blodangan::Press_Start::Message_Press_Start, :press_start)
  end
end


#==============================================================================
# ■ Scene_Press_Start
#==============================================================================

class Scene_Press_Start < Scene_Base
  #--------------------------------------------------------------------------
  # Start
  #--------------------------------------------------------------------------
  def start
    super
    SceneManager.clear
    Graphics.freeze
    create_fond
    create_premier_plan
    create_command_window
    play_press_start_music
  end
  #--------------------------------------------------------------------------
  # Transition
  #--------------------------------------------------------------------------
  def transition_speed
    return 20
  end
  #--------------------------------------------------------------------------
  # Terminate
  #--------------------------------------------------------------------------
  def terminate
    super
    SceneManager.snapshot_for_background
    dispose_fond
    dispose_premier_plan
  end
  #--------------------------------------------------------------------------
  # Create Fond
  #--------------------------------------------------------------------------
  def create_fond
    @fond1 = Sprite.new
    @fond1.bitmap = Cache.title1(Blodangan::Press_Start::Fond1)
    @fond2 = Sprite.new
    @fond2.bitmap = Cache.title2(Blodangan::Press_Start::Fond2)
    centrer_sprite(@fond1)
    centrer_sprite(@fond2)
  end
  #--------------------------------------------------------------------------
  # Create Premier Plan
  #--------------------------------------------------------------------------
  def create_premier_plan
    @premier_plan = Sprite.new
    @premier_plan.bitmap = Bitmap.new(Graphics.width, Graphics.height)
    @premier_plan.z = 100
    dessiner_titre_jeu if Blodangan::Press_Start::Afficher_Titre_Jeu
  end
  #--------------------------------------------------------------------------
  # Dessiner Titre Jeu
  #--------------------------------------------------------------------------
  def dessiner_titre_jeu
    @premier_plan.bitmap.font.size = 48
    rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2)
    @premier_plan.bitmap.draw_text(rect, $data_system.game_title, 1)
  end
  #--------------------------------------------------------------------------
  # Dispose Fond
  #--------------------------------------------------------------------------
  def dispose_fond
    @fond1.bitmap.dispose
    @fond1.dispose
    @fond2.bitmap.dispose
    @fond2.dispose
  end
  #--------------------------------------------------------------------------
  # Dispose Premier Plan
  #--------------------------------------------------------------------------
  def dispose_premier_plan
    @premier_plan.bitmap.dispose
    @premier_plan.dispose
  end
  #--------------------------------------------------------------------------
  # Centrer Sprite
  #--------------------------------------------------------------------------
  def centrer_sprite(sprite)
    sprite.ox = sprite.bitmap.width / 2
    sprite.oy = sprite.bitmap.height / 2
    sprite.x = Graphics.width / 2
    sprite.y = Graphics.height / 2
  end
  #--------------------------------------------------------------------------
  # Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    @command_window = Window_PressStartCommand.new
    @command_window.set_handler(:press_start, method(:command_press_start))
  end
  #--------------------------------------------------------------------------
  # Close Command Window
  #--------------------------------------------------------------------------
  def close_command_window
    @command_window.close
    update until @command_window.close?
  end
  #--------------------------------------------------------------------------
  # Command Press Start
  #--------------------------------------------------------------------------
  def command_press_start
    close_command_window
    SceneManager.call(Scene_Title)
  end
  #--------------------------------------------------------------------------
  # Play Press Start Music
  #--------------------------------------------------------------------------
  def play_press_start_music
    @musique = Blodangan::Press_Start::Musique_Press_Start
    Audio.bgm_play("Audio/BGM/" + @musique, 100, 100, 0)
    RPG::BGS.stop
    RPG::ME.stop
  end
end
Revenir en haut Aller en bas
 

Press Start avant l'écran titre

Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

 Sujets similaires

-
» Press start avant l'ecran titre en image
» [VX] Texte Press Start
» Fusion de script d'écran titre (carte+appuyez sur start+ecran titre animé)
» Aide avant l'écran titre V1
» Avant l'écran titre ... Intro (résolu)

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Maker VX :: Entraide :: Scripts :: Bac à sable-
Créer un forum | ©phpBB | Forum gratuit d'entraide | Signaler un abus | Forum gratuit