Cutscene Menu
#1
Cutscene Menu
by sasuke89
Jan 2 2007

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Intro:
Alright so what this script does is create a cutscene Menu as seen in Tales of Symphonia. Basically like this:


Script:
Code:
class Scene_Cutscene
  attr_accessor :cutscene_finished
  attr_accessor :windowimages
  def initialize(number,image1,image2,image3,image4)
    if number > 4
      number = 4
    end
    @number = number
    @image1 = image1
    @image2 = image2
    @image3 = image3
    @image4 = image4
  end
  def main
    @cutscene_finished = false
    @spriteset = Spriteset_Map.new
    @windowimages = Window_Cut.new
    @x_window = []
    @x_window.push(Window_X.new(-1,"XTYPE"))
    @x_window.push(Window_X.new(0,"CTYPE"))
    for i in 0..1
      @x_window[i].visible = false
    end
    @window_image = []
    @window_image.push(Window_Image.new(@image1.to_s))#"kietaroumugshot"
    @window_image.push(Window_Image.new(@image2.to_s))#"sethmugshot"
    @window_image.push(Window_Image.new(@image3.to_s))#"jessica"
    @window_image.push(Window_Image.new(@image4.to_s))#"jessica"
    for i in 0..3
      @window_image[i].opacity = 0
      @window_image[i].back_opacity = 0
      @window_image[i].visible = false
      @window_image[0].x = 0
      @window_image[1].x = 640 - @window_image[1].width
      if @number < 4
        @window_image[2].x = 640 / 2 - 75
      else
        @window_image[2].x = 0
      end
      @window_image[2].y = @windowimages.height / 2
      @window_image[3].x = 640 - @window_image[3].width
      @window_image[3].y = @windowimages.height / 2
    end
    if @number > 0
      @window_image[0].visible = true
    end
    if @number > 1
      @window_image[1].visible = true
    end
    if @number > 2
      @window_image[2].visible = true
    end
    if @number > 3
      @window_image[3].visible = true
    end
    @message_window = Window_Message.new
    #@message_window.x = 0
    #@message_window.y = 320
    #@message_window.width = 640
    #@message_window.height = 160
    #@message_window.visible = false
    @wait_count = 0
    Graphics.transition
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame Update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @windowimages.dispose
    for i in 0..3
      @window_image[i].dispose
    end
    for i in 0..1
      @x_window[i].dispose
    end
    @message_window.dispose
    @spriteset.dispose
  end
  def update
    if @wait_count > 0
      @wait_count -= 1
      return
    end
    # Loop
    loop do
      if @cutscene_finished == true
        for i in 0..1
          @x_window[i].visible = true
        end
      end
      # Update sprite set
      #@x_window.update
      @spriteset.update
      # Update message window
      @message_window.update
      @windowimages.update
      for i in 0..3
        @window_image[i].update
      end
      for i in 0..1
        @x_window[i].update
      end
      # Update map, interpreter, and player order
      # (this update order is important for when conditions are fulfilled
      # to run any event, and the player isn't provided the opportunity to
      # move in an instant)
      $game_map.update
      $game_system.map_interpreter.update
      $game_player.update
      # Update system (timer), screen
      $game_system.update
      $game_screen.update
      # Abort loop if player isn't place moving
      unless $game_temp.player_transferring
        break
      end
      # Abort loop if transition processing
      if $game_temp.transition_processing
        break
      end
    end
    # If showing message window
    if $game_temp.message_window_showing
      return
    end
    # If command window is active: call update_command
    # If status window is active: call update_status
    # If B button was pressed
    if @cutscene_finished == true
      for i in 0..1
        @x_window[i].visible = true
      end
      if Input.trigger?(Input::C)
        # Play cancel SE
        $game_system.se_play($data_system.cancel_se)
        # Switch to map screen
        $scene = Scene_Map.new
        return
      end
      if Input.trigger?(Input::B)
        # Play cancel SE
        $game_system.se_play($data_system.cancel_se)
        # Switch to map screen
        $scene = Scene_Map.new
        return
      end
    end
  end
end
class Window_Cut < Window_Base #Window where Character Images are shown.
  def initialize
    super(0, 0, 640,480)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface#"Arial Black"
    self.contents.font.size = 18
    self.contents.font.color = text_color(0)
  end
end
class Window_Image < Window_Base
  def initialize(image)
    super(0, 0, 120,135)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents = RPG::Cache.picture(image)
  end
end
class Window_X < Window_Base
  def initialize(index,type)
    super(0,0,135,135)
    self.x = $scene.windowimages.width / 2 - 50 + index * 64
    self.z = 1000
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents = RPG::Cache.picture(type)
    #self.z = 1000
    self.back_opacity = 0
    self.opacity = 0
  end
end


How to Use:
Code:
$scene = Scene_Cutscene.new(number,image1,image2,image3,image4)

number is the number of Actors shown in Menu. no more than four.
images are the images of the actor

Make sure images exist in pictures folder.

For example:
Code:
$scene = Scene_Cutscene.new(3,"kietaroumugshot","sethmugshot","jessicamugshot","")
Show Text: \nm[\n[1]]What's up dude.
Show Text: \nm[\n[2]]Nuthin' Much
Show Text: \nm[\n[3]]How bout that.


Pictures Used:
(Pictures missing/expired)


What it does:

The Script is basically just a scene that runs events. Just add Events like Show Text and they work. The Script is mainly for cutscenes though. Show Text, and Wait Commands are the Commands that should mainly be used.


Notes:

Works with everything. Works with all Message Systems.

*sigh*
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  MAP MENU Artofmin 0 2,670 12-01-2009, 01:00 PM
Last Post: Artofmin
  FFTA Shop Menu Chrono Cry 0 2,492 04-25-2007, 01:00 PM
Last Post: Chrono Cry
  Crystals Menu Leon Blade 0 2,518 12-24-2006, 01:00 PM
Last Post: Leon Blade
  Leon's Options Menu Leon Westbrooke 0 2,688 11-13-2006, 01:00 PM
Last Post: Leon Westbrooke



Users browsing this thread: 1 Guest(s)