Accueil du SiteAccueil du Site  AccueilAccueil  Dernières imagesDernières images  RechercherRechercher  ConnexionConnexion  S'enregistrerS'enregistrer  



-67%
Le deal à ne pas rater :
Carte Fnac+ à 4,99€ au lieu de 14,99€ (nouveaux clients / ...
4.99 € 14.99 €
Voir le deal

Partagez
 

 Choisir un lieu lors de la nouvelle partie.

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
catskart
Chevalier (niveau 1)
Chevalier (niveau 1)
catskart

Messages postés : 79
Date d'inscription : 03/11/2013
Jauge LPC :
Choisir un lieu lors de la nouvelle partie. 891527140044 / 10044 / 100Choisir un lieu lors de la nouvelle partie. 8915271400


Choisir un lieu lors de la nouvelle partie. Empty
MessageSujet: Choisir un lieu lors de la nouvelle partie.   Choisir un lieu lors de la nouvelle partie. EmptyLun 31 Mar 2014 - 15:58

Voici un script qui permet de choisir entre 6 maps où le héros y sera, lorsque vous cliquerez sur la nouvelle partie.

Code:
#==============================================================================
# ** Scene_Episode Par catskart
#==============================================================================


#------------------------------------------------------------------------------
# Les valeurs pour changer le point de départ des 6 maps. (vous pouvez
# bien sûr les modifier)
# id = La map
# x = le coordonné X
# y = le coordonné Y
#------------------------------------------------------------------------------
# Map 1
$idE1 = 1
$xE1 = 0
$yE1 = 0
# Map 2
$idE2 = 2
$xE2 = 0
$yE2 = 0
# Map 3
$idE3 = 3
$xE3 = 0
$yE3 = 0
# Map 4
$idE4 = 4
$xE4 = 0
$yE4 = 0
# Map 5
$idE5 = 5
$xE5 = 0
$yE5 = 0
# Map 6
$idE6 = 6
$xE5 = 0
$yE5 = 0

#------------------------------------------------------------------------------
# ** Scene_Title (Pour la commande new game)
#------------------------------------------------------------------------------
class Scene_Title
  def command_new_game
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Switch to Episode screen
    $scene = Scene_Episode.new
  end
end

class Scene_Episode
  def main
    s1 = "Map 1"
    s2 = "Map 2"
    s3 = "Map 3"
    s4 = "Map 4"
    s5 = "Map 5"
    s6 = "Map 6"
    s7 = "Retour"
    @command_window = Window_Command.new(192, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.back_opacity = 160
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 288
    @command_window.height= 190
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    if $scene.is_a?(Scene_Title)
      Graphics.transition
      Graphics.freeze
    end
  end
  def update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Title.new
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0
        command_E1
      when 1
        command_E2
      when 2
        command_E3
      when 3
        command_E4
      when 4
        command_E5
      when 5
        command_E6
      when 6
        command_back
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * episode 1
  #--------------------------------------------------------------------------
  def command_E1
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Stop BGM
    Audio.bgm_stop
    # Reset frame count for measuring play time
    Graphics.frame_count = 0
    # Make each type of game object
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    # Set up initial party
    $game_party.setup_starting_members
    # Set up initial map position
    $game_map.setup($idE1)
    # Move player to initial position
    $game_player.moveto($xE1, $yE1)
    # Refresh player
    $game_player.refresh
    # Run automatic change for BGM and BGS set with map
    $game_map.autoplay
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # episode 2
  #--------------------------------------------------------------------------
  def command_E2
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Stop BGM
    Audio.bgm_stop
    # Reset frame count for measuring play time
    Graphics.frame_count = 0
    # Make each type of game object
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    # Set up initial party
    $game_party.setup_starting_members
    # Set up initial map position
    $game_map.setup($idE2)
    # Move player to initial position
    $game_player.moveto($xE2, $yE2)
    # Refresh player
    $game_player.refresh
    # Run automatic change for BGM and BGS set with map
    $game_map.autoplay
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # episode 3
  #--------------------------------------------------------------------------
  def command_E3
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Stop BGM
    Audio.bgm_stop
    # Reset frame count for measuring play time
    Graphics.frame_count = 0
    # Make each type of game object
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    # Set up initial party
    $game_party.setup_starting_members
    # Set up initial map position
    $game_map.setup($idE3)
    # Move player to initial position
    $game_player.moveto($xE3, $yE3)
    # Refresh player
    $game_player.refresh
    # Run automatic change for BGM and BGS set with map
    $game_map.autoplay
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # episode 4
  #--------------------------------------------------------------------------
  def command_E4
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Stop BGM
    Audio.bgm_stop
    # Reset frame count for measuring play time
    Graphics.frame_count = 0
    # Make each type of game object
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    # Set up initial party
    $game_party.setup_starting_members
    # Set up initial map position
    $game_map.setup($idE4)
    # Move player to initial position
    $game_player.moveto($xE4, $yE4)
    # Refresh player
    $game_player.refresh
    # Run automatic change for BGM and BGS set with map
    $game_map.autoplay
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # episode 5
  #--------------------------------------------------------------------------
  def command_E5
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Stop BGM
    Audio.bgm_stop
    # Reset frame count for measuring play time
    Graphics.frame_count = 0
    # Make each type of game object
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    # Set up initial party
    $game_party.setup_starting_members
    # Set up initial map position
    $game_map.setup($idE5)
    # Move player to initial position
    $game_player.moveto($xE5, $yE5)
    # Refresh player
    $game_player.refresh
    # Run automatic change for BGM and BGS set with map
    $game_map.autoplay
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # episode 6
  #--------------------------------------------------------------------------
  def command_E6
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Stop BGM
    Audio.bgm_stop
    # Reset frame count for measuring play time
    Graphics.frame_count = 0
    # Make each type of game object
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    # Set up initial party
    $game_party.setup_starting_members
    # Set up initial map position
    $game_map.setup($idE6)
    # Move player to initial position
    $game_player.moveto($xE6, $yE6)
    # Refresh player
    $game_player.refresh
    # Run automatic change for BGM and BGS set with map
    $game_map.autoplay
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # retour
  #--------------------------------------------------------------------------
  def command_back
    # Play decision SE
    $game_system.se_play($data_system.cancel_se)
    # Switch to load screen
    $scene = Scene_Title.new
  end
end
Revenir en haut Aller en bas
 
Choisir un lieu lors de la nouvelle partie.
Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» [VX]Faces sets lors des sauvegardes
» Choisir les membres de son groupe
» Faire disparaître le battlers lors de combat
» Problème lors de l'utilisation du script de scan.
» Lieu adaptable.

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Le Palais Créatif :: ~ PARTAGE ~ :: Scripts et plugins :: RPG Maker XP :: Menu-
Sauter vers: