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



-34%
Le deal à ne pas rater :
-34% LG OLED55B3 – TV OLED 4K 55″ 2023 – 100Hz HDR 10+, ...
919 € 1399 €
Voir le deal

Partagez
 

 [VX] Fusion de scripts d'écran titre + préintro.

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
MirainoHikari
Ex-Admin-Script
Ex-Admin-Script
MirainoHikari


Masculin Age : 41
Inscrit le : 26/05/2008
Messages : 2360

[VX] Fusion de scripts d'écran titre + préintro. Empty
MessageSujet: [VX] Fusion de scripts d'écran titre + préintro.   [VX] Fusion de scripts d'écran titre + préintro. Icon_minitimeMar 15 Juil 2008 - 16:00

Le pire script à faire à ce jour. Il n'est pas parfait (voir le tutoriel pour les détail), mais il va en intéresser plus d'un quand même.

Ce script permet à la fois d'utiliser le JukeBox (de fils du loup), le préintro (par moi) et utiliser la version customise (présenté par MaxHack). Il permet également d'enlever l'item Continuer s'il n'y a pas de sauvegarde (par moi).

Code:
#===============================================================================
#  Menu_Fusion
#===============================================================================
# Costumizer par DeadlyDan, modifié par MaxHack, remodifié par MirainoHikari
# Jukebox par Fils du loup (nécessite le script du même auteur pour foncitonner)
# PreIntro par Miraino Hikari
#===============================================================================
# Fusion effectuer par Miraino Hikari rpg-maker-vx.bbactf.com
#===============================================================================


$PRE_START_DEF = false #true = intro avant écrant titre false = menu en commencant
$PRE_START_MAP = 1 #index de la map à afficher comme intro
$PRE_START_WIN = $PRE_START_DEF

module Fusion_Title

    IMAGE_NEW = [ "nouvelle", "nouvelle_2" ]   
    IMAGE_CONTINUE = [ "charger", "charger_2" ]   
    IMAGE_QUIT = [ "quitter", "quitter_2" ]   
    IMAGE_JUKEBOX = [ "jukebox", "jukebox_2" ]
   
    ITEM_IMAGES = [IMAGE_NEW, IMAGE_CONTINUE, IMAGE_QUIT, IMAGE_JUKEBOX]
    CONTINUE_POS = 1 #un array commence à la position 0
end

class Window_Command < Window_Selectable
    def get_height
    return (@item_max.to_i * 32)
  end
end

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
 
 
  def update
    if !$PRE_START_WIN
      super
      #@command_window.update
      if Input.trigger?(Input::C)
        $PRE_START_WIN = $PRE_START_DEF
        if @continue_enabled
          case @menu_index
          when 0    # Nouvelle
            command_new_game
          when 1    # Continuer
            command_continue
          when 2    # Quitter
            command_shutdown
          when 3    # JukeBox
            Sound.play_decision
            $scene = Scene_Jukebox.new
          end
        else
          case @menu_index
          when 0    #New Game
            command_new_game
          when 1    #Shutdown
            command_shutdown
          when 2    # JukeBox
            Sound.play_decision
            $scene = Scene_Jukebox.new
          end
        end
      end
    end
    update_menu
  end
 
  def create_menu
    padding = 5
    @menu_item = []
    @menu_images = Fusion_Title::ITEM_IMAGES.clone
   
    if ( !@continue_enabled )
      @menu_images.delete_at Fusion_Title::CONTINUE_POS
    end
   
    for i in 1..@menu_images.size
      @menu_item.push ( Sprite.new )
    end

    for i in 1..@menu_images.size
      @menu_item[(i-1)].blend_type = 0
      @menu_item[(i-1)].bitmap = Cache.system ( @menu_images[(i-1)][0] )
      @menu_item[(i-1)].x = ( ( Graphics.width / 2 ) - ( @menu_item[(i-1)].bitmap.width / 2 ) )
      @menu_item[(i-1)].y = ( ( Graphics.height / (0.5 * @menu_images.size) ) - ( @menu_item[(i-1)].bitmap.height / 2 ) + ( @menu_item[(i-1)].bitmap.height / 1.4 + padding )*(i-1))
    end
    @menu_item[0].bitmap = Cache.system ( @menu_images[0][1] )
   
    @menu_count = @menu_item.size
    @menu_index = 0
  end

  def create_command_window
    s1 = Vocab::new_game
    s2 = Vocab::continue
    s3 = Vocab::shutdown
    s4 = "Jukebox"
    if @continue_enabled
      @command_window = Window_Command.new(172, [s1, s2, s3,s4])
    else
      @command_window = Window_Command.new(172, [s1, s3, s4])
    end
    @command_window.x = (544 - @command_window.width) / 2
    @command_window.y = (384 - @command_window.get_height)
    @command_window.openness = 0
    @command_window.open
  end
 
  def update_menu
    if ( Input.repeat? ( Input::UP ) or Input.repeat? ( Input::DOWN ) )
      last_index = @menu_index
     
      if ( Input.repeat? ( Input::DOWN ) )
        if ( @menu_index < ( @menu_count - 1 )  )
          @menu_index += 1
        else
          @menu_index = 0
        end
      end
     
      if ( Input.repeat? ( Input::UP ) )
        if ( @menu_index > 0  )
          @menu_index -= 1
        else
          @menu_index = ( @menu_count - 1 )
        end
      end
     
      if ( @menu_index != last_index )
        Sound.play_cursor
      end
     
      for i in 0..@menu_images.size-1
        if ( i == @menu_index )
          @menu_item[i].bitmap = Cache.system ( @menu_images[i][1] )
        else
          @menu_item[i].bitmap = Cache.system ( @menu_images[i][0] )
        end
      end
    end   
  end
 
  def dispose_menu
    for i in 0..@menu_item.size - 1
        @menu_item[i].dispose
    end
  end
 
  def command_new_game
    confirm_player_location
    Sound.play_decision
    $game_party.setup_starting_members            # Initial party
    $game_map.setup($data_system.start_map_id)    # Initial map position
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    $game_player.refresh
    $scene = Scene_Map.new
    RPG::BGM.fade(1500)
    #close_command_window
    dispose_menu
    Graphics.fadeout(60)
    Graphics.wait(40)
    Graphics.frame_count = 0
    RPG::BGM.stop
    $game_map.autoplay
  end
 
  def command_pre_game
    $game_map.setup($PRE_START_MAP)    # Initial map position
    $game_player.moveto(1, 1)
    $game_player.refresh
    $scene = Scene_Map.new
    $game_map.autoplay
  end

  def start
    super
    load_database                    # Load database
    create_game_objects              # Create game objects
    if $PRE_START_WIN
      command_pre_game
    else
      check_continue                    # Determine if continue is enabled
      create_title_graphic              # Create title graphic
      #create_command_window            # Create command window
      create_menu
      play_title_music                  # Play title screen music
    end
  end
 
  def post_start
    if !$PRE_START_WIN
      super
      #open_command_window
    end
  end

  def pre_terminate
    if !$PRE_START_WIN
      super
      #close_command_window
    end
  end
 
  def terminate
    if !$PRE_START_WIN
      super
      #dispose_command_window
      dispose_menu
      snapshot_for_background
      dispose_title_graphic
    end
  end
 
end

Vous m'en donnerez des nouvelles.


Dernière édition par MirainoHikari le Mar 15 Juil 2008 - 18:38, édité 1 fois
Revenir en haut Aller en bas
http://mirainohikari.deviantart.com
fabY
dYeu retraité prématurément
dYeu retraité prématurément
fabY


Masculin Age : 28
Inscrit le : 09/02/2008
Messages : 5357

[VX] Fusion de scripts d'écran titre + préintro. Empty
MessageSujet: Re: [VX] Fusion de scripts d'écran titre + préintro.   [VX] Fusion de scripts d'écran titre + préintro. Icon_minitimeMar 15 Juil 2008 - 18:29

Merci Hikari !

Mais tu devrai quand même écrire a quoi sert ce script....
Revenir en haut Aller en bas
https://rpg-maker-vx.bbactif.com/
MirainoHikari
Ex-Admin-Script
Ex-Admin-Script
MirainoHikari


Masculin Age : 41
Inscrit le : 26/05/2008
Messages : 2360

[VX] Fusion de scripts d'écran titre + préintro. Empty
MessageSujet: Re: [VX] Fusion de scripts d'écran titre + préintro.   [VX] Fusion de scripts d'écran titre + préintro. Icon_minitimeMar 15 Juil 2008 - 18:39

Lol, t'as bien raison, voilà c'est édité. Désolé, c'était évident pour moi... Je voulais le poster rapidement depuis le temps que je me fends la tête là dessus.
Revenir en haut Aller en bas
http://mirainohikari.deviantart.com
Contenu sponsorisé




[VX] Fusion de scripts d'écran titre + préintro. Empty
MessageSujet: Re: [VX] Fusion de scripts d'écran titre + préintro.   [VX] Fusion de scripts d'écran titre + préintro. Icon_minitime

Revenir en haut Aller en bas
 

[VX] Fusion de scripts d'écran titre + préintro.

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

 Sujets similaires

-
» Fusion/Merge des scripts écrans titre (med-exp)
» Fusion de script d'écran titre (carte+appuyez sur start+ecran titre animé)
» Fusion Maker.
» Fusion de Tile
» Fusion de Tile

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