设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1688|回复: 5
打印 上一主题 下一主题

[已经解决] 对话的时候一直播放SE,怎么做?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
31 小时
注册时间
2009-7-6
帖子
107
跳转到指定楼层
1
发表于 2010-8-14 22:31:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 OWOWOW 于 2010-8-15 12:21 编辑

  1. # ▼▲▼ XRXS 9. 真对话加强脚本 ver.2 ▼▲▼
  2. # by 桜雅 在土
  3. #
  4. # update 2006/ 6/ 7
  5. #
  6. # SixRice 改造双重对话框功能  2006/ 8/ 18
  7. #==============================================================================
  8. # □ 使用习惯
  9. #==============================================================================
  10. class Window_Message < Window_Selectable
  11.   #--------------------------------------------------------------------------
  12.   # 字体相关设定
  13.   #--------------------------------------------------------------------------
  14.   DEFAULT_FONT_NAME      = ""       # 字体  ( ""为系统默认 )
  15.   DEFAULT_FONT_SIZE      =  20      # 字号  (默认22)
  16.   DEFAULT_LINE_SPACE     =  28      # 字间距(默认32)
  17.   #--------------------------------------------------------------------------
  18.   # 基本设定
  19.   #--------------------------------------------------------------------------
  20.   DEFAULT_BG_PICTURE     = ""       # 背景SKIN ( "" 为系统默认 )
  21.   DEFAULT_BG_X           =   0      # 背景SKIN X 位置
  22.   DEFAULT_BG_Y           = 320      # 背景SKIN Y 位置
  23.   DEFAULT_RECT           = Rect.new(72, 304, 496, 160) #矩形
  24.   DEFAULT_BACK_OPACITY   = 192      # 底图的不透明度
  25.   DEFAULT_STRETCH_ENABLE = true     # 五行以上自动翻页
  26.   #--------------------------------------------------------------------------
  27.   # インフォメーションウィンドウ
  28.   #--------------------------------------------------------------------------
  29.   INFO_RECT              = Rect.new(0, 0, 640, DEFAULT_LINE_SPACE + 38)
  30.   #--------------------------------------------------------------------------
  31.   # 逐字显示 (false时直接显示一页)
  32.   #--------------------------------------------------------------------------
  33.   DEFAULT_TYPING_ENABLE = true # 逐字显示
  34.   DEFAULT_TYPING_SPEED  = 1    # 显示速度,越小越快
  35.   #--------------------------------------------------------------------------
  36.   # 高速跳过显示
  37.   #--------------------------------------------------------------------------
  38.   KEY_SHOW_ALL          = Input::C # 瞬间显示完当前页文章
  39.   KEY_MESSAGE_SKIP      = Input::CTRL # 高速跳过(文章不完全显示)
  40.   #
  41.   # 高速スキップを有効にするスイッチのID.( 0 は常時可能)
  42.   #
  43.   HISKIP_ENABLE_SWITCH_ID = 0
  44.   #
  45.   # 高速スキップ・タイピングスキップを共に禁止するスイッチのID. ( 0 は常時可能)
  46.   #
  47.   SKIP_BAN_SWITCH_ID      = 0
  48.   #--------------------------------------------------------------------------
  49.   # 顔グラフィック
  50.   #--------------------------------------------------------------------------
  51.   FACE_STRETCH_ENABLE    =  false     # 顔グラフィックを↓指定のサイズに拡大する。
  52.   FACE_WIDTH             =  116      # 拡大後の「幅」
  53.   FACE_HEIGHT            =  116      # 拡大後の「高さ」
  54.   #--------------------------------------------------------------------------
  55.   # キャラポップ
  56.   #--------------------------------------------------------------------------
  57.   CHARPOP_HEIGHT         =  48      # キャラポップの高さ
  58. end
  59. module XRXS9
  60.   #--------------------------------------------------------------------------
  61.   # ネームウィンドウ
  62.   #--------------------------------------------------------------------------
  63.   NAME_WINDOW_TEXT_COLOR  = Color.new(192,240,255,255) # \name ウィンドウ文字色
  64.   NAME_WINDOW_TEXT_SIZE   =  14     # \name ウィンドウの文字サイズ
  65.   NAME_WINDOW_SPACE       =  10     # \name ウィンドウの余白
  66.   NAME_WINDOW_OFFSET_X    =   0     # \name ウィンドウのオフセット位置 X
  67.   NAME_WINDOW_OFFSET_Y    = -26     # \name ウィンドウのオフセット位置 Y
  68.   #--------------------------------------------------------------------------
  69.   # 終了時フェードアウト (Fade Out Before Terminate)
  70.   #--------------------------------------------------------------------------
  71.   FOBT_DURATION           =  20     # \fade を指定した時のフェード持続時間
  72. end
  73. #==============================================================================
  74. # --- セリフ効果音 ---
  75. #        $game_system.speak_se = RPG::AudioFile.new("")と設定し使用します。
  76. #==============================================================================
  77. class Game_System
  78.   attr_accessor :speak_se
  79.   def speak_se_play
  80.     self.se_play(self.speak_se) if self.speak_se != nil
  81.   end
  82. end
  83. class Window_Message < Window_Selectable
  84.   # 文字描画SE除外文字
  85.   NOT_SOUND_CHARACTERS = [" ", " ", "・", "、", "。", "─"]
  86. end
  87. #==============================================================================
  88. # □ Sprite_Pause
  89. #==============================================================================
  90. class Sprite_Pause < Sprite
  91.   def initialize
  92.     super
  93.     self.bitmap = RPG::Cache.windowskin("pause.png")
  94.     self.x = 586
  95.     self.y = 416
  96.     self.z = 9999
  97.     @count = 0
  98.     @wait_count = 0
  99.     update
  100.   end
  101.   def update
  102.     super
  103.     if @wait_count > 0
  104.       @wait_count -= 1
  105.     else
  106.       @count = (@count + 1)%6
  107.       x = 37*@count
  108.       self.src_rect.set(x, 0, 37, 55)
  109.       @wait_count = 1
  110.     end
  111.   end
  112. end
  113. #==============================================================================
  114. # ■ Window_Message
  115. #==============================================================================
  116. class Window_Message < Window_Selectable
  117.   # 定数
  118.   LEFT   = 0
  119.   CENTER = 1
  120.   RIGHT  = 2
  121.   #--------------------------------------------------------------------------
  122.   # ○ line_height : 行の高さ(@y増加値)を返します。
  123.   #--------------------------------------------------------------------------
  124.   def line_height
  125.     return DEFAULT_LINE_SPACE
  126.   end
  127.   #--------------------------------------------------------------------------
  128.   # ● オブジェクト初期化
  129.   #--------------------------------------------------------------------------
  130.   alias xrxs9_initialize initialize
  131.   def initialize
  132.     # 初期化
  133.     @stand_pictuers = []
  134.     @held_windows = []
  135.     @extra_windows = []
  136. #======================↓双重对话框功能↓====================================   
  137.     @held_windows2 = []
  138.     @extra_windows2 = []
  139. #======================↑双重对话框功能↑====================================     
  140.     @extra_sprites = []
  141.     # ポーズサイン
  142.     @pause = Sprite_Pause.new
  143.     @pause.visible = false
  144.     # 呼び戻す
  145.     xrxs9_initialize
  146.   end
  147.   #--------------------------------------------------------------------------
  148.   # ● 解放
  149.   #--------------------------------------------------------------------------
  150.   alias xrxs9_dispose dispose
  151.   def dispose   
  152.     # ホールドされたウィンドウを開放
  153.     @held_windows.each {|window| window.dispose}
  154.     @held_windows.clear
  155. #======================↓双重对话框功能↓====================================
  156.     @held_windows2.each {|window| window.dispose}
  157.     @held_windows2.clear
  158. #======================↑双重对话框功能↑====================================   
  159.     # ポーズサイン
  160.     @pause.dispose
  161.     # 外字キャッシュ開放
  162.     if @gaiji_cache != nil
  163.       @gaiji_cache.dispose
  164.       @gaiji_cache = nil
  165.     end
  166.     # 呼び戻す
  167.     xrxs9_dispose
  168.   end
  169.   #--------------------------------------------------------------------------
  170.   # ● メッセージ終了処理
  171.   #--------------------------------------------------------------------------
  172.   alias xrxs9_terminate_message terminate_message
  173.   def terminate_message
  174.     # 素通りフラグをクリア
  175.     @passable = false
  176.     $game_player.messaging_moving = false
  177.     # 背景ピクチャを解放
  178.     if @bgframe_sprite != nil
  179.       @bgframe_sprite.dispose
  180.     end   
  181.     # ウィンドウホールド
  182.     if @window_hold
  183.       # ウィンドウやスプライトの複製を作成
  184.       @held_windows.push(Window_Copy.new(self))
  185.       for window in @extra_windows
  186.         next if window.disposed?
  187.         @held_windows.push(Window_Copy.new(window))
  188.       end
  189.       for sprite in @extra_sprites
  190.         next if sprite.disposed?
  191.         @held_windows.push(Sprite_Copy.new(sprite))
  192.       end
  193.       # 設定をクリア
  194.       self.opacity = 0
  195.       self.contents_opacity = 0
  196.       @extra_windows.clear
  197.       @extra_sprites.clear
  198.     else
  199.       # ホールドされたウィンドウを開放
  200.       @held_windows.each {|object| object.dispose}
  201.       @held_windows.clear
  202.     end  
  203. #======================↓双重对话框功能↓====================================   
  204.     # ウィンドウホールド2
  205.     if @window_hol2
  206.       # ウィンドウやスプライトの複製を作成
  207.       @held_windows2.push(Window_Copy2.new(self))
  208.       for window in @extra_windows2
  209.         next if window.disposed?
  210.         @held_windows2.push(Window_Copy2.new(window))
  211.       end
  212.       for sprite in @extra_sprites
  213.         next if sprite.disposed?
  214.         @held_windows.push(Sprite_Copy.new(sprite))
  215.       end
  216.       # 設定をクリア
  217.       self.opacity = 0
  218.       self.contents_opacity = 0
  219.       @extra_windows2.clear
  220.       @extra_sprites.clear
  221.     else
  222.       # ホールドされたウィンドウを開放
  223.       @held_windows2.each {|object| object.dispose}
  224.       @held_windows2.clear
  225.     end
  226. #======================↑双重对话框功能↑====================================   
  227.     # ネームウィンドウらを解放
  228.     if @name_window_frame != nil
  229.       @name_window_frame.dispose
  230.       @name_window_frame = nil
  231.     end
  232.     if @name_window_text  != nil
  233.       @name_window_text.dispose
  234.       @name_window_text  = nil
  235.     end
  236.     # 呼び戻す
  237.     xrxs9_terminate_message
  238.   end
  239.   #--------------------------------------------------------------------------
  240.   # ○ ポップキャラクターの設定と取得
  241.   #--------------------------------------------------------------------------
  242.   def pop_character=(character_id)
  243.     @pop_character = character_id
  244.   end
  245.   def pop_character
  246.     return @pop_character
  247.   end
  248.   #--------------------------------------------------------------------------
  249.   # ○ クリア
  250.   #--------------------------------------------------------------------------
  251.   def clear
  252.     self.contents.clear
  253.     self.contents.font.color = normal_color
  254.     self.contents.font.size  = DEFAULT_FONT_SIZE
  255.     self.contents.font.name = DEFAULT_FONT_NAME if DEFAULT_FONT_NAME != ""
  256.     self.opacity          = 255
  257.     self.back_opacity     = DEFAULT_BACK_OPACITY
  258.     self.contents_opacity = 255
  259.     Window_Copy
  260.     @mid_stop     = false       # \!      の中断中フラグ
  261.     @face_file    = nil         # \f      の顔ファイル
  262.     @current_name = nil         # \name   のネーム保持
  263. #======================↓双重对话框功能↓====================================   
  264.     @window_hold  = false       # \hold   のウィンドウホールドのフラグ
  265.     @window_hol2  = false
  266. #======================↑双重对话框功能↑====================================   
  267.     @stand_pictuer_hold = false # \picthold のスタンドピクチャの保持フラグ
  268.     @passable     = false       # \pass   の素通り可能フラグ
  269.     @inforesize   = false       # \info   のインフォリサイズ
  270.     # あと残りのここらへんのものを全て 0 で初期化
  271.     @x = @y = @indent = @line_index = 0
  272.     @cursor_width = @write_wait = @lines_max = 0
  273.     # タイピングスピードを取得
  274.     @write_speed = DEFAULT_TYPING_SPEED
  275.     # 各行の描画幅&位置揃え設定初期化
  276.     @line_widths = []
  277.     @line_aligns = []
  278.     # self.pop_character が nil の場合、標準位置。-1の場合、文字センター。
  279.     # 0以上の場合 キャラポップ。0は主人公、1以降はイベント。
  280.     self.pop_character = nil
  281.   end
  282.   #--------------------------------------------------------------------------
  283.   # ● リフレッシュ [再定義]
  284.   #--------------------------------------------------------------------------
  285.   def refresh
  286.     # ビットマップの取得と設定
  287.     if DEFAULT_BG_PICTURE != ""
  288.       bitmap = RPG::Cache.picture(DEFAULT_BG_PICTURE)
  289.       @bgframe_sprite = Sprite.new
  290.       @bgframe_sprite.x = DEFAULT_BG_X
  291.       @bgframe_sprite.y = DEFAULT_BG_Y
  292.       @bgframe_sprite.bitmap = bitmap
  293.       @bgframe_sprite.z += 5
  294.     end
  295.     # 初期化
  296.     self.clear
  297.     # 表示待ちのメッセージがある場合
  298.     if $game_temp.message_text != nil
  299.       @now_text = $game_temp.message_text
  300.       # 改行削除指定\_があるか?
  301.       if (/\\_\n/.match(@now_text)) != nil
  302.         $game_temp.choice_start -= 1
  303.         @now_text.gsub!(/\\_\n/) { "" }
  304.       end
  305.       # 顔表示指定\Fがあるか?
  306.       if (/\\[Ff]\[(.+?)(?:,(\d+))?\]/.match(@now_text)) != nil
  307.         # ファイルチェック
  308.         if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
  309.           # フェイスファイルを設定
  310.           @face_file = $1 + ".png"
  311.           @face_index = $2.to_i
  312.           # 全行インデントを入れる。
  313.           src = RPG::Cache.picture(@face_file)
  314.           self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  315.           if FACE_STRETCH_ENABLE
  316.             @indent += FACE_WIDTH
  317.           elsif $2 == nil
  318.             @indent += src.width
  319.             @face_index = -1
  320.           else
  321.             @indent += src.width/4
  322.           end
  323.         end
  324.         @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
  325.       end
  326.       # インフォ判定
  327.       @inforesize = (@now_text.gsub!(/\\info/) { "" } != nil)
  328. #======================↓双重对话框功能↓====================================      
  329.       # ウィンドウ保持指定\holdがあるか?
  330.       @window_hold = (@now_text.gsub!(/\\hold/) { "" } != nil)
  331.             # ウィンドウ保持指定\holdがあるか?
  332.       @window_hol2 = (@now_text.gsub!(/\\hol2/) { "" } != nil)
  333. #======================↑双重对话框功能↑====================================      
  334.       # \vの即時変換
  335.       @now_text.gsub!(/\\[v]\[([0-9]+)\]/) { $game_variables[$1.to_i].to_s }
  336.       # \Vを独自ルーチンに変更(追加部分)
  337.       begin
  338.         last_text = @now_text.clone
  339.         @now_text.gsub!(/\\[V]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  340.       end until @now_text == last_text
  341.       @now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  342.         $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  343.       end
  344.       # \name 判定
  345.       if @now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
  346.         @current_name = $1
  347.       end
  348.       # ウィンドウポップ判定
  349.       if @now_text.gsub!(/\\[Pp]\[([0-9]+)\]/) { "" }
  350.         self.pop_character = $1.to_i
  351.       end
  352.       # 改行指定
  353.       if (/\\n/.match(@now_text)) != nil
  354.         $game_temp.choice_start += 1
  355.         @now_text.gsub!(/\\n/) { "\n" }
  356.       end
  357.       # フェード判定
  358.       if @now_text.gsub!(/\\fade/) { "" }
  359.         @fade_count_before_terminate = XRXS9::FOBT_DURATION
  360.       end
  361.       # 素通り判定
  362.       if @now_text.gsub!(/\\pass/) { "" }
  363.         @passable = true
  364.         $game_player.messaging_moving = true
  365.       end
  366.       # 末尾連続改行を削除
  367.       nil while( @now_text.sub!(/\n\n\z/) { "\n" } )
  368.       # 行数の取得
  369.       @lines_max = @now_text.scan(/\n/).size
  370.       # 現在搭載されている制御文字を配列化
  371.       rxs = [/\\\w\[(\w+)\]/, /\\[.]/, /\\[|]/, /\\[>]/, /\\[<]/, /\\[!]/,
  372.               /\\[~]/, /\\[i]/, /\\[Oo]\[([0-9]+)\]/, /\\[Hh]\[([0-9]+)\]/,
  373.               /\\[b]\[([0-9]+)\]/, /\\[Rr]\[(.*?)\]/, /\\[B]/, /\\[I]/]
  374.       @max_choice_x = 0
  375.       # インフォウィンドウの強制センタリング
  376.       @line_aligns[0] = CENTER if @inforesize
  377.       #
  378.       # [行ごとの設定]
  379.       #
  380.       lines = @now_text.split(/\n/)
  381.       for i in 0..@lines_max
  382.         # 行の取得 (インデックスは逆順)
  383.         line = lines[@lines_max - i]
  384.         # 空白行の場合は次へ
  385.         next if line == nil
  386.         # 制御文字を削る
  387.         line.gsub!(/\\[Ee]\[([0-9]+)\]/) { "\022[#{$1}]" }
  388.         for rx in rxs
  389.           line.gsub!(rx) { "" }
  390.         end
  391.         # 位置揃えを取得
  392.         @line_aligns[@lines_max - i] =
  393.           line.sub!(/\\center/) {""} ? CENTER :
  394.           line.sub!(/\\right/)  {""} ? RIGHT :
  395.                                        LEFT
  396.         # 行の横幅の取得と設定
  397.         cx = contents.text_size(line).width
  398.         @line_widths[@lines_max - i] = cx
  399.       end
  400.       # 選択肢行以降の最大横幅を取得
  401.       choices = @line_widths[$game_temp.choice_start, @line_widths.size]
  402.       @max_choice_x = choices == nil ? 0 : choices.max + 8
  403.       # 位置揃え制御文字の削除
  404.       @now_text.gsub!(/\\center/) {""}
  405.       @now_text.gsub!(/\\right/) {""}
  406.       # キャラポップ時のウィンドウリサイズ
  407.       if self.pop_character != nil and self.pop_character >= 0
  408.         max_x = @line_widths.max
  409.         self.width = max_x + 32 + @indent + DEFAULT_FONT_SIZE/2
  410.         self.height = [@lines_max * line_height, @indent].max  + 32
  411.       end
  412.       #
  413.       # 「変換」
  414.       #
  415.       # 便宜上、"\\\\" を "\000" に変換
  416.       @now_text.gsub!(/\\\\/) { "\000" }
  417.       # "\\C" を "\001" に、"\\G" を "\002" に、
  418.       # "\\S" を "\003" に、"\\A" を "\004" に変換
  419.       @now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  420.       @now_text.gsub!(/\\[Gg]/) { "\002" }
  421.       @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
  422.       @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
  423.       @now_text.gsub!(/\\[.]/) { "\005" }
  424.       @now_text.gsub!(/\\[|]/) { "\006" }
  425.       # 競合すると何かと気まずいので、\016以降を使用する
  426.       @now_text.gsub!(/\\[>]/) { "\016" }
  427.       @now_text.gsub!(/\\[<]/) { "\017" }
  428.       @now_text.gsub!(/\\[!]/) { "\020" }
  429.       @now_text.gsub!(/\\[~]/) { "\021" }
  430.       @now_text.gsub!(/\\[Ee]\[([0-9]+)\]/) { "\022[#{$1}]" }
  431.       # インデント設定(追加部分)
  432.       @now_text.gsub!(/\\[i]/) { "\023" }
  433.       # テキスト透過率指定(追加部分)
  434.       @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  435.       # テキストサイズ指定(追加部分)
  436.       @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  437.       # 空白挿入(追加部分)
  438.       @now_text.gsub!(/\\[b]\[([0-9]+)\]/) { "\026[#{$1}]" }
  439.       # ルビ表示(追加部分)
  440.       @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "\027[#{$1}]" }
  441.       # Font.bold
  442.       @now_text.gsub!(/\\[B]/) { "\031" }
  443.       # Font.italic
  444.       @now_text.gsub!(/\\[I]/) { "\032" }
  445.       # ここで一旦ウィンドウ位置更新
  446.       reset_window
  447.       #
  448.       # \nameがあるか?~「ネームウィンドウの作成」
  449.       #
  450.       if @current_name != nil
  451.         # フォントを一時設定
  452.         self.contents.font.size = XRXS9::NAME_WINDOW_TEXT_SIZE
  453.         # 枠だけウィンドウの作成
  454.         x = self.x + XRXS9::NAME_WINDOW_OFFSET_X
  455.         y = self.y + XRXS9::NAME_WINDOW_OFFSET_Y
  456.         w = self.contents.text_size(@current_name).width + 8 + XRXS9::NAME_WINDOW_SPACE
  457.         h = 26 + XRXS9::NAME_WINDOW_SPACE
  458.         @name_window_frame = Window_Base.new(x, y, w, h)
  459.         @name_window_frame.opacity = 160
  460.         @name_window_frame.z = self.z + 2
  461.         # 擬似的な空中文字描写(ウィンドウ使用)を作成
  462.         x = self.x + XRXS9::NAME_WINDOW_OFFSET_X + 3 + XRXS9::NAME_WINDOW_SPACE / 2
  463.         y = self.y + XRXS9::NAME_WINDOW_OFFSET_Y + 1 + XRXS9::NAME_WINDOW_SPACE / 2
  464.         @name_window_text = Air_Text.new(x,y, @current_name, XRXS9::NAME_WINDOW_TEXT_SIZE, XRXS9::NAME_WINDOW_TEXT_COLOR)
  465.         @name_window_text.z = self.z + 3
  466.         # フォントを復旧
  467.         self.contents.font.size = DEFAULT_FONT_SIZE
  468.         # エクストラウィンドウに登録
  469.         @extra_windows.push(@name_window_frame)
  470.         @extra_windows.push(@name_window_text)
  471.       end
  472.     end
  473.     # ウィンドウを更新
  474.     reset_window
  475.     # コンテンツの再作成
  476.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  477.     self.contents.font.color = normal_color
  478.     self.contents.font.name = DEFAULT_FONT_NAME if DEFAULT_FONT_NAME != ""
  479.     unless @face_file.nil?
  480.       # 顔グラを描画
  481.       src = RPG::Cache.picture(@face_file)
  482.       if @face_index == -1
  483.         w = src.width
  484.         h = src.height
  485.         x = 0
  486.         y = 0
  487.       else
  488.         w = src.width/4
  489.         h = src.height/4
  490.        x = (@face_index-1) % 4 * w
  491.        y = (@face_index-1) / 4 * h
  492.       end
  493.       if FACE_STRETCH_ENABLE
  494.         self.contents.stretch_blt(Rect.new(0,0,FACE_WIDTH,FACE_HEIGHT), src, Rect.new(x, y, w, h))
  495.       else
  496.         self.contents.blt(6, 6, src, Rect.new(x, y, w, h))
  497.       end
  498.     end
  499.     #
  500.     # 選択肢の場合
  501.     #
  502.     if $game_temp.choice_max > 0
  503.       @item_max = $game_temp.choice_max
  504.       self.active = true
  505.       self.index = 0
  506.     end
  507.     #
  508.     # 数値入力の場合
  509.     #
  510.     if $game_temp.num_input_variable_id > 0
  511.       digits_max = $game_temp.num_input_digits_max
  512.       number = $game_variables[$game_temp.num_input_variable_id]
  513.       @input_number_window = Window_InputNumber.new(digits_max)
  514.       @input_number_window.number = number
  515.       @input_number_window.x = self.x + 8 + @indent
  516.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  517.     end
  518.     # フォントサイズを再設定
  519.     self.contents.font.size  = DEFAULT_FONT_SIZE
  520.     # 行初期化
  521.     line_reset
  522.     # 瞬間表示の場合はこのままフレーム更新へ
  523.     update unless DEFAULT_TYPING_ENABLE
  524.   end
  525.   #--------------------------------------------------------------------------
  526.   # ○ 行初期化
  527.   #--------------------------------------------------------------------------
  528.   def line_reset
  529.     # 位置揃えの取得
  530.     case @line_aligns[@line_index]
  531.     when LEFT
  532.       @x  = @indent
  533.       @x += 8 if $game_temp.choice_start <= @line_index
  534.     when CENTER
  535.       @x = self.width / 2 - 16 - @line_widths[@line_index].to_i / 2
  536.     when RIGHT
  537.       @x = self.width - 40 - @line_widths[@line_index].to_i
  538.     end
  539.   end
  540.   #--------------------------------------------------------------------------
  541.   # ● フレーム更新 [再定義]
  542.   #--------------------------------------------------------------------------
  543.   def update
  544.     # メッセージ素通り中にイベントが開始した場合
  545.     if @passable and not $game_player.messaging_moving
  546.       self.opacity = 0
  547.       terminate_message
  548.       return
  549.     end
  550.     # ポーズサイン
  551.     @pause.update if @pause.visible
  552.     # 呼び戻す
  553.     super
  554.     # フレーム更新↓
  555.     update_main
  556.   end
  557.   #--------------------------------------------------------------------------
  558.   # ○ フレーム更新
  559.   #--------------------------------------------------------------------------
  560.   def update_main
  561.     # 動きに対応
  562.     if !self.pop_character.nil? and self.pop_character >= 0
  563.       update_reset_window
  564.     end
  565.     # フェードインの場合
  566.     if skippable_now? and Input.press?(KEY_MESSAGE_SKIP)
  567.       self.contents_opacity = 255
  568.       @fade_in = false
  569.     elsif @fade_in
  570.       self.contents_opacity += 24
  571.       if @input_number_window != nil
  572.         @input_number_window.contents_opacity += 24
  573.       end
  574.       if self.contents_opacity == 255
  575.         @fade_in = false
  576.       end
  577.       return
  578.     end
  579.     @now_text = nil if @now_text == "" # 変換
  580.     # 表示待ちのメッセージがある場合
  581.     if @now_text != nil and @mid_stop == false
  582.       if @write_wait > 0
  583.         @write_wait -= 1
  584.         return
  585.       end
  586.       text_not_skip = DEFAULT_TYPING_ENABLE
  587.       while true
  588.         # c に 1 文字を取得 (文字が取得できなくなるまでループ)
  589.         if (c = @now_text.slice!(/./m)) != nil
  590.           # \\ の場合
  591.           if c == "\000"
  592.             # 本来の文字に戻す
  593.             c = "\\"
  594.           end
  595.           # \C[n] の場合
  596.           if c == "\001"
  597.             # 文字色を変更
  598.             @now_text.sub!(/\[([0-9]+)\]/, "")
  599.             color = $1.to_i
  600.             if color >= 0 and color <= 7
  601.               self.contents.font.color = text_color(color)
  602.               if @opacity != nil
  603.                 color = self.contents.font.color
  604.                 self.contents.font.color = Color.new(color.red, color.green, color.blue, color.alpha * @opacity / 255)
  605.               end
  606.             end
  607.             # 次の文字へ
  608.             c = ""
  609.           end
  610.           # \G の場合
  611.           if c == "\002"
  612.             # ゴールドウィンドウを作成
  613.             if @gold_window == nil
  614.               @gold_window = Window_Gold.new
  615.               @gold_window.x = 560 - @gold_window.width
  616.               if $game_temp.in_battle
  617.                 @gold_window.y = 192
  618.               else
  619.                 @gold_window.y = self.y >= 128 ? 32 : 384
  620.               end
  621.               @gold_window.opacity = self.opacity
  622.               @gold_window.back_opacity = self.back_opacity
  623.             end
  624.             # 次の文字へ
  625.             c = ""
  626.           end
  627.           # \S[n] の場合
  628.           if c == "\003"
  629.             # 文字色を変更
  630.             @now_text.sub!(/\[([0-9]+)\]/, "")
  631.             speed = $1.to_i
  632.             if speed >= 0 and speed <= 19
  633.               @write_speed = speed
  634.             end
  635.             # 次の文字へ
  636.             c = ""
  637.           end
  638.           # \. の場合
  639.           if c == "\005"
  640.             @write_wait += 5
  641.             c = ""
  642.           end
  643.           # \| の場合
  644.           if c == "\006"
  645.             @write_wait += 20
  646.             c = ""
  647.           end
  648.           # \> の場合
  649.           if c == "\016"
  650.             text_not_skip = false
  651.             c = ""
  652.           end
  653.           # \<の場合
  654.           if c == "\017"
  655.             text_not_skip = true
  656.             c = ""
  657.           end
  658.           # \!の場合
  659.           if c == "\020"
  660.             @mid_stop = true
  661.             c = ""
  662.           end
  663.           # \~の場合
  664.           if c == "\021"
  665.             terminate_message
  666.             return
  667.           end
  668.           # \Iの場合(追加部分)
  669.           if c == "\023"
  670.             # 今の@xをインデント位置に設定
  671.             @indent = @x
  672.             c = ""
  673.           end
  674.           # \Oの場合(追加部分)
  675.           if c == "\024"
  676.             @now_text.sub!(/\[([0-9]+)\]/, "")
  677.             @opacity = $1.to_i
  678.             color = self.contents.font.color
  679.             self.contents.font.color = Color.new(color.red, color.green, color.blue, color.alpha * @opacity / 255)
  680.             c = ""
  681.           end
  682.           # \Hの場合(追加部分)
  683.           if c == "\025"
  684.             @now_text.sub!(/\[([0-9]+)\]/, "")
  685.             self.contents.font.size = [[$1.to_i, 6].max, 32].min
  686.             c = ""
  687.           end
  688.           # \Bの場合(追加部分)
  689.           if c == "\026"
  690.             @now_text.sub!(/\[([0-9]+)\]/, "")
  691.             @x += $1.to_i
  692.             c = ""
  693.           end
  694.           # \Rの場合「ルビ」
  695.           if c == "\027"
  696.             process_ruby
  697.             # 文字描写のSEを演奏
  698.             $game_system.speak_se_play
  699.             c = ""
  700.           end
  701.           # アイコン描画用シーケンスの場合(追加部分)
  702.           if c == "\030"
  703.             # アイコンファイル名を取得
  704.             @now_text.sub!(/\[(.*?)\]/, "")
  705.             # アイコンを描画
  706.             self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
  707.             @x += 24
  708.             # 次の文字へ
  709.             c = ""
  710.           end
  711.           #
  712.           # 改行文字の場合
  713.           #
  714.           if c == "\n"
  715.             # y に 1 を加算
  716.             @y += 1
  717.             #
  718.             # 次の行へ (改行処理 + X位置設定)
  719.             #
  720.             @line_index += 1
  721.             line_reset
  722.             # 選択肢ならカーソルの更新
  723.             if @line_index >= $game_temp.choice_start
  724.               @cursor_width = @max_choice_x
  725.             end
  726.             # 次の文字へ
  727.             c = ""
  728.           end
  729.           # 外字表示の場合
  730.           if c == "\022"
  731.             # []部分の除去
  732.             @now_text.sub!(/\[([0-9]+)\]/, "")
  733.             # 外字を表示(sr)
  734.             @x += draw_gaiji(16 + 4 + @x, 6+@y * line_height + (line_height - self.contents.font.size), $1.to_i)
  735.             # 次の文字へ
  736.             c = ""
  737.           end
  738.           # Font.boldの場合 (排他的論理和での反転)
  739.           if c == "\031"
  740.             self.contents.font.bold ^= true
  741.             c = ""
  742.           end
  743.           # Font.italicの場合
  744.           if c == "\032"
  745.             self.contents.font.italic ^= true
  746.             c = ""
  747.           end
  748.           if c != ""
  749.             # 文字を描画(sr)
  750.             self.contents.draw_text(16 + 4 +@x, 6+line_height * @y, 40, line_height, c)
  751.             @x += self.contents.text_size(c).width
  752.             # 文字描写のSEを演奏
  753.             unless NOT_SOUND_CHARACTERS.include?(c)
  754.               $game_system.speak_se_play
  755.             end
  756.           end
  757.           # Bボタンが押された場合
  758.           if skippable_now? and
  759.             (Input.press?(KEY_SHOW_ALL) or Input.press?(KEY_MESSAGE_SKIP)) and
  760.             (SKIP_BAN_SWITCH_ID == 0 ? true : !$game_switches[SKIP_BAN_SWITCH_ID])
  761.             text_not_skip = false
  762.           end
  763.         else
  764.           text_not_skip = true
  765.           break
  766.         end
  767.         # 終了判定
  768.         break if text_not_skip
  769.       end
  770.       @write_wait += @write_speed
  771.       return
  772.     end
  773.     # 数値入力中の場合
  774.     if @input_number_window != nil
  775.       @input_number_window.update
  776.       # 決定
  777.       if Input.trigger?(Input::C)
  778.         $game_system.se_play($data_system.decision_se)
  779.         $game_variables[$game_temp.num_input_variable_id] = @input_number_window.number
  780.         $game_map.need_refresh = true
  781.         # 数値入力ウィンドウを解放
  782.         @input_number_window.dispose
  783.         @input_number_window = nil
  784.         terminate_message
  785.       end
  786.       return
  787.     end
  788.     #
  789.     # メッセージ表示中の場合
  790.     #
  791.     if @contents_showing
  792.       # 終了前フェーズでない場合
  793.       unless @fade_phase_before_terminate
  794.         # 選択肢の表示中でなければポーズサインを表示
  795.         if $game_temp.choice_max == 0
  796.           #self.pause = true
  797.           @pause.visible = true
  798.         end
  799.         # キャンセル
  800.         if Input.trigger?(Input::B)
  801.           if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  802.             $game_system.se_play($data_system.cancel_se)
  803.             $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  804.             terminate_message
  805.             @pause.visible = false
  806.             return
  807.           end
  808.         end
  809.         # 決定
  810.         if Input.trigger?(Input::C) or
  811.            (skippable_now? and Input.press?(KEY_MESSAGE_SKIP))
  812.           if $game_temp.choice_max > 0
  813.             $game_system.se_play($data_system.decision_se)
  814.             $game_temp.choice_proc.call(self.index)
  815.           end
  816.           if @mid_stop
  817.             @mid_stop = false
  818.             @pause.visible = false
  819.             return
  820.           elsif @fade_count_before_terminate.to_i > 0
  821.             # 終了前フェーズへ
  822.             @fade_phase_before_terminate = true
  823.           else
  824.             terminate_message
  825.           end
  826.           @pause.visible = false
  827.         end
  828.       end
  829.       # 終了前:カウント + フェードアウト
  830.       if @fade_phase_before_terminate
  831.         # 例外補正
  832.         @fade_count_before_terminate  = 0 if @fade_count_before_terminate == nil
  833.         # カウント
  834.         @fade_count_before_terminate -= 1
  835.         # 不透明度を計算・設定
  836.         opacity = @fade_count_before_terminate * (256 / XRXS9::FOBT_DURATION)
  837.         self.contents_opacity = opacity
  838.         # 終了判定
  839.         if @fade_count_before_terminate <= 0
  840.           @fade_count_before_terminate = 0
  841.           @fade_phase_before_terminate = false
  842.           terminate_message
  843.         end
  844.       end
  845.       return
  846.     end
  847.     #
  848.     # 以下、メッセージ表示中でない場合
  849.     #
  850.     # フェードアウト中以外で表示待ちのメッセージか選択肢がある場合
  851.     if @fade_out == false and $game_temp.message_text != nil
  852.       @contents_showing = true
  853.       $game_temp.message_window_showing = true
  854.       refresh
  855.       Graphics.frame_reset
  856.       self.visible = true
  857.       self.contents_opacity = 0
  858.       if @input_number_window != nil
  859.         @input_number_window.contents_opacity = 0
  860.       end
  861.       @fade_in = true
  862.       return
  863.     end
  864.     # 表示すべきメッセージがないが、ウィンドウが可視状態の場合
  865.     if self.visible
  866.       @fade_out = true
  867.       self.opacity -= 48
  868.       if self.opacity == 0
  869.         self.visible = false
  870.         @fade_out = false
  871.         $game_temp.message_window_showing = false
  872.       end
  873.       return
  874.     end
  875.   end
  876.   #--------------------------------------------------------------------------
  877.   # ● 设置窗口位置与不透明度[再定義]
  878.   #--------------------------------------------------------------------------
  879.   def reset_window
  880.     if @inforesize
  881.       RectalCopy.copy(self, INFO_RECT)
  882.     elsif self.pop_character != nil and self.pop_character >= 0
  883.       update_reset_window
  884.     else
  885.       RectalCopy.copy(self, DEFAULT_RECT)
  886.       #
  887.       case ($game_temp.in_battle ? 0 : $game_system.message_position)
  888.       when 0  # 上 (戦闘中は上扱い)
  889.         self.y = [16, -XRXS9::NAME_WINDOW_OFFSET_Y + 4].max

  890.       when 1  # 中
  891.         self.y = 160

  892.       end
  893.       # 自動リサイズ
  894.       if DEFAULT_STRETCH_ENABLE and @lines_max >= 4
  895.         # 拡張する差分を計算
  896.         d = @lines_max * DEFAULT_LINE_SPACE + 32 - self.height
  897.         if d > 0
  898.           self.height += d
  899.           case $game_system.message_position
  900.           when 1  # 中
  901.             self.y -= d/2

  902.           when 2  # 下
  903.             self.y -= d

  904.           end
  905.         end
  906.       end
  907.       if @face_file != nil
  908.         self.width += FACE_WIDTH
  909.         self.x -= FACE_WIDTH/2
  910.       end
  911.     end
  912.     if $game_system.message_frame == 0
  913.       self.back_opacity = DEFAULT_BACK_OPACITY
  914.       @name_window_frame.back_opacity = DEFAULT_BACK_OPACITY unless @name_window_frame.nil?
  915.     else
  916.       self.opacity = 0
  917.       @name_window_frame.back_opacity = 0 unless @name_window_frame.nil?
  918.     end
  919.   end
  920.   #--------------------------------------------------------------------------
  921.   # ○ ウィンドウの位置と不透明度の設定 (キャラポップ)
  922.   #--------------------------------------------------------------------------
  923.   def update_reset_window
  924.     #
  925.     # 「キャラポップ」
  926.     #
  927.     if self.pop_character == 0 or $game_map.events[self.pop_character] != nil
  928.       character = get_character(self.pop_character)
  929.       x = character.screen_x - self.width / 2
  930.       case $game_system.message_position
  931.       when 0
  932.         if @name_window_frame != nil and @name_window_frame.y <= 4
  933.           y = 4 - XRXS9::NAME_WINDOW_OFFSET_Y
  934.         else
  935.           y = character.screen_y - CHARPOP_HEIGHT - self.height
  936.         end
  937.       else
  938.         y = character.screen_y
  939.       end
  940.       self.x = [[x, 4].max, 636 - self.width ].min
  941.       self.y = [[y, 4].max, 476 - self.height].min
  942.       if  @name_window_frame != nil
  943.         @name_window_frame.x = self.x + XRXS9::NAME_WINDOW_OFFSET_X
  944.         @name_window_frame.y = self.y + XRXS9::NAME_WINDOW_OFFSET_Y
  945.         @name_window_text.x  = self.x + XRXS9::NAME_WINDOW_OFFSET_X + 1 + XRXS9::NAME_WINDOW_SPACE/2 - 16
  946.         @name_window_text.y  = self.y + XRXS9::NAME_WINDOW_OFFSET_Y + 1 + XRXS9::NAME_WINDOW_SPACE/2 - 16
  947.       end
  948.     end
  949.   end
  950.   #--------------------------------------------------------------------------
  951.   # ○ カーソルの矩形更新 [オーバーライド]
  952.   #--------------------------------------------------------------------------
  953.   def update_cursor_rect
  954.     if @index >= 0
  955.       n = $game_temp.choice_start + @index
  956.       self.cursor_rect.set(8 + @indent, n * line_height, @cursor_width, line_height)
  957.     else
  958.       self.cursor_rect.empty
  959.     end
  960.   end
  961.   #--------------------------------------------------------------------------
  962.   # ○ キャラクターの取得
  963.   #     parameter : パラメータ
  964.   #--------------------------------------------------------------------------
  965.   def get_character(parameter)
  966.     # パラメータで分岐
  967.     case parameter
  968.     when 0  # プレイヤー
  969.       return $game_player
  970.     else  # 特定のイベント
  971.       events = $game_map.events
  972.       return events == nil ? nil : events[parameter]
  973.     end
  974.   end
  975.   #--------------------------------------------------------------------------
  976.   # ○ 現在キースキップが可能か?
  977.   #--------------------------------------------------------------------------
  978.   def skippable_now?
  979.     return ((SKIP_BAN_SWITCH_ID == 0 ? true : !$game_switches[SKIP_BAN_SWITCH_ID]) and
  980.        (HISKIP_ENABLE_SWITCH_ID == 0 ? true : $game_switches[HISKIP_ENABLE_SWITCH_ID]))
  981.   end
  982.   #--------------------------------------------------------------------------
  983.   # ○ 可視状態
  984.   #--------------------------------------------------------------------------
  985.   def visible=(b)
  986.     @name_window_frame.visible = b unless @name_window_frame.nil?
  987.     @name_window_text.visible  = b unless @name_window_text.nil?
  988.     @input_number_window.visible  = b unless @input_number_window.nil?
  989.     super
  990.   end
  991.   #--------------------------------------------------------------------------
  992.   # メソッド テンプレート
  993.   #--------------------------------------------------------------------------
  994.   def process_ruby
  995.   end
  996.   def draw_gaiji(x, y, num)
  997.   end
  998.   def convart_value(option, index)
  999.   end
  1000. end
  1001. #==============================================================================
  1002. # □ Air_Text (何も無いところに文字描写 = 枠の無い瞬間表示メッセージウィンドウ)
  1003. #==============================================================================
  1004. class Air_Text < Window_Base
  1005.   #--------------------------------------------------------------------------
  1006.   # ○ オブジェクト初期化
  1007.   #--------------------------------------------------------------------------
  1008.   def initialize(x, y, designate_text, size, text_color)
  1009.     super(x-16, y-16, 32 + designate_text.size * 12, 56)
  1010.     self.opacity      = 0
  1011.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1012.     w = self.contents.width
  1013.     h = self.contents.height
  1014.     self.contents.font.size = size
  1015.     self.contents.font.color = text_color
  1016.     self.contents.draw_text(0, 0, w, h, designate_text)
  1017.   end
  1018. end
  1019. #==============================================================================
  1020. # □ Window_Copy
  1021. #------------------------------------------------------------------------------
  1022. #   指定のウィンドウのコピーを作成します。
  1023. #==============================================================================
  1024. class Window_Copy < Window_Base
  1025.   #--------------------------------------------------------------------------
  1026.   # ○ オブジェクト初期化
  1027.   #--------------------------------------------------------------------------
  1028.   def initialize(window)
  1029.     super(window.x, window.y, window.width, window.height)
  1030.     self.contents = window.contents.dup unless window.contents.nil?
  1031.     self.opacity = window.opacity
  1032.     self.back_opacity = window.back_opacity
  1033.     self.z = window.z
  1034.   end
  1035. end
  1036. #======================↓双重对话框功能↓====================================
  1037. class Window_Copy2 < Window_Base
  1038.   #--------------------------------------------------------------------------
  1039.   # ○ オブジェクト初期化
  1040.   #--------------------------------------------------------------------------
  1041.   def initialize(window)
  1042.     super(window.x, window.y, window.width, window.height)
  1043.     self.contents = window.contents.dup unless window.contents.nil?
  1044.     self.opacity = window.opacity
  1045.     self.back_opacity = window.back_opacity
  1046.     self.z = window.z
  1047.   end
  1048. end
  1049. #======================↑双重对话框功能↑=====================================
  1050. #==============================================================================
  1051. # □ Sprite_Copy
  1052. #------------------------------------------------------------------------------
  1053. #   指定のスプライトのコピーを作成します。
  1054. #==============================================================================
  1055. class Sprite_Copy < Sprite
  1056.   #--------------------------------------------------------------------------
  1057.   # ○ オブジェクト初期化
  1058.   #--------------------------------------------------------------------------
  1059.   def initialize(sprite)
  1060.     super()
  1061.     self.bitmap = sprite.bitmap.dup unless sprite.bitmap.nil?
  1062.     self.opacity = sprite.opacity
  1063.     self.x = sprite.x
  1064.     self.y = sprite.y
  1065.     self.z = sprite.z
  1066.     self.ox = sprite.ox
  1067.     self.oy = sprite.oy
  1068.   end
  1069. end
  1070. #==============================================================================
  1071. # ■ Interpreter
  1072. #==============================================================================
  1073. class Interpreter
  1074.   #--------------------------------------------------------------------------
  1075.   # ● 文章の表示
  1076.   #--------------------------------------------------------------------------
  1077.   def command_101
  1078.     # ほかの文章が message_text に設定済みの場合
  1079.     if $game_temp.message_text != nil
  1080.       # 終了
  1081.       return false
  1082.     end
  1083.     # メッセージ終了待機中フラグおよびコールバックを設定
  1084.     @message_waiting = true
  1085.     $game_temp.message_proc = Proc.new { @message_waiting = false }
  1086.     # message_text に 1 行目を設定
  1087.     $game_temp.message_text = @list[@index].parameters[0] + "\n"
  1088.     line_count = 1
  1089.     # ループ
  1090.     loop do
  1091.       # 次のイベントコマンドが文章 2 行目以降の場合
  1092.       if @list[@index+1].code == 401
  1093.         # message_text に 2 行目以降を追加
  1094.         $game_temp.message_text += @list[@index+1].parameters[0] + "\n"
  1095.         line_count += 1
  1096.       # イベントコマンドが文章 2 行目以降ではない場合
  1097.       else
  1098.         # 次のイベントコマンドが文章の表示の場合
  1099.         if @list[@index+1].code == 101
  1100.           if (/\\next\Z/.match($game_temp.message_text)) != nil
  1101.             $game_temp.message_text.gsub!(/\\next/) { "" }
  1102.             $game_temp.message_text += @list[@index+1].parameters[0] + "\n"
  1103.             # インデックスを進める
  1104.             @index += 1
  1105.             next
  1106.           end
  1107.         # 次のイベントコマンドが選択肢の表示の場合
  1108.         elsif @list[@index+1].code == 102
  1109.           # 選択肢が画面に収まる場合
  1110.           if @list[@index+1].parameters[0].size <= 4 - line_count
  1111.             # インデックスを進める
  1112.             @index += 1
  1113.             # 選択肢のセットアップ
  1114.             $game_temp.choice_start = line_count
  1115.             setup_choices(@list[@index].parameters)
  1116.           end
  1117.         # 次のイベントコマンドが数値入力の処理の場合
  1118.         elsif @list[@index+1].code == 103
  1119.           # 数値入力ウィンドウが画面に収まる場合
  1120.           if line_count < 4
  1121.             # インデックスを進める
  1122.             @index += 1
  1123.             # 数値入力のセットアップ
  1124.             $game_temp.num_input_start = line_count
  1125.             $game_temp.num_input_variable_id = @list[@index].parameters[0]
  1126.             $game_temp.num_input_digits_max = @list[@index].parameters[1]
  1127.           end
  1128.         end
  1129.         # 継続
  1130.         return true
  1131.       end
  1132.       # インデックスを進める
  1133.       @index += 1
  1134.     end
  1135.   end
  1136. end
  1137. #==============================================================================
  1138. # --- メッセージ中移動許可 ---
  1139. #==============================================================================
  1140. class Game_Player < Game_Character
  1141.   attr_accessor :messaging_moving
  1142. end
  1143. #==============================================================================
  1144. # --- 範囲コピー ---
  1145. #==============================================================================
  1146. module RectalCopy
  1147.   def self.copy(rect1, rect2)
  1148.     rect1.x      = rect2.x
  1149.     rect1.y      = rect2.y
  1150.     rect1.width  = rect2.width
  1151.     rect1.height = rect2.height
  1152.   end
  1153. end

复制代码
脚本↑

http://rpg.blue/thread-151909-1-1.html
↑看了7L的回帖,我就想,能不能在对话的时候一直播放SE,For example:一直播放打字的音效,自己却不会做,应该怎么做捏?

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3294
在线时间
3618 小时
注册时间
2006-9-6
帖子
37400

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

2
发表于 2010-8-15 00:08:49 | 只看该作者
BGM和BGS本来就能循环放,所以你把那个音效放进这两个文件夹里就好了。然后用淡出的办法停止。(最少要1秒,这个我没办法……)
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
319
在线时间
890 小时
注册时间
2009-10-12
帖子
1829
3
发表于 2010-8-15 03:17:37 | 只看该作者
真人对话其实是一个很囧的选择…………你见过空之轨迹有真人对话(不包括战斗发大招),见过那一款大型游戏
{def 大型游戏
        容量至少1g
   end}
有真人对话的,如果有,麻烦给一个链接,我倒要看看那些声优累到什么程度。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
31 小时
注册时间
2009-7-6
帖子
107
4
 楼主| 发表于 2010-8-15 08:14:54 | 只看该作者
= =如果用BGS的方法貌似太麻烦了,能不能加点code呀……
我叫“竹笋
:①
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
31 小时
注册时间
2009-7-6
帖子
107
5
 楼主| 发表于 2010-8-15 08:53:58 | 只看该作者
本帖最后由 OWOWOW 于 2010-8-15 08:55 编辑

汗~~自己解决了
把754行换成

  1.         if $game_switches[25]
  2.           Audio.se_play("Audio/SE/打字声效文件名")
  3.         end
复制代码
就可以了。谢谢大家
我叫“竹笋
:①
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
229
在线时间
596 小时
注册时间
2010-6-21
帖子
1218
6
发表于 2010-8-15 08:55:27 | 只看该作者
为什么不把对话的se做成BGM呢

点评

背景音乐不就是BGM吗?我指的是,做成BGM,就没有背景音乐,做成BGS,控制不便。  发表于 2010-8-15 12:13
上面的是BGM。。。  发表于 2010-8-15 09:56
那如果还要背景音乐呢?如果做成BGS的话,控制起来可能更不方便吧  发表于 2010-8-15 09:39
如果我是一个美工就好啦!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-6-16 23:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表