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

Project1

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

[已经过期] 如何在对话时的每一个字都有声音 我有原脚本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
85 小时
注册时间
2008-3-30
帖子
45
跳转到指定楼层
1
发表于 2012-7-20 19:59:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
RUBY 代码复制
  1. class Window_Message < Window_Selectable
  2.  
  3.  
  4.   SoundFile = "Audio/SE/键盘声1"
  5.  
  6.   WaitTime = 2
  7.  
  8.   alias update_message_sound update_message
  9.  
  10.  
  11.   def update_message
  12.  
  13.  
  14.     update_message_sound
  15.  
  16.  
  17.     if !@waittime
  18.  
  19.  
  20.       @waittime = WaitTime
  21.  
  22.  
  23.     elsif @waittime < WaitTime
  24.  
  25.  
  26.       @waittime += 1
  27.  
  28.  
  29.     else
  30.  
  31.  
  32.       Audio.se_play(SoundFile,80)
  33.  
  34.       @waittime = 0
  35.  
  36.  
  37.     end
  38.  
  39.  
  40.   end
  41.  
  42.  
  43. end
RMVX的原脚本 就是日式RPG每个字都发出一次音效的那种

点评

类似《大神》里那种唧唧歪歪的囧音对白么……  发表于 2012-7-22 14:28

Lv1.梦旅人

梦石
0
星屑
47
在线时间
412 小时
注册时间
2012-6-1
帖子
1021
2
发表于 2012-7-20 20:04:41 | 只看该作者
楼主的意思是将这个脚本移植到VA内吗?
这里是新人 明特·布兰马修
脚本盲 事件盲 美工盲
还是色盲ORZ
XP\VX略懂VA无助很抱歉
所以问题什么如果答不好就不要提醒我了
短篇7已经放弃,但是坑在继续补上。所以回答和现身次数少之。
有事烧纸或者留言即可。

还有我不是正太啊ORZ
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
85 小时
注册时间
2008-3-30
帖子
45
3
 楼主| 发表于 2012-7-20 20:12:42 | 只看该作者
明特·布兰马修 发表于 2012-7-20 20:04
楼主的意思是将这个脚本移植到VA内吗?

嗯!~求高人
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
94
在线时间
191 小时
注册时间
2011-10-12
帖子
320
4
发表于 2012-7-20 21:32:46 | 只看该作者
  1. module TMMESSAGESE
  2.   MESSAGE_SE = RPG::SE.new("Cursor1", 80, 150)      AUTO_SE = true     
  3.   VN_MESSAGE_WAIT = 9end

  4. class Window_Message
  5.     alias tmmessagese_window_message_clear_flags clear_flags
  6.   def clear_flags
  7.     tmmessagese_window_message_clear_flags
  8.     @se_flag = TMMESSAGESE::AUTO_SE
  9.   end
  10.   alias tmessagese_window_message_wait_for_one_character wait_for_one_character
  11.   def wait_for_one_character
  12.     [$game_variables[TMMESSAGESE::VN_MESSAGE_WAIT], 1].max.times do |i|
  13.       tmessagese_window_message_wait_for_one_character
  14.     end
  15.   end
  16.   alias tmmessagese_window_message_process_normal_character process_normal_character
  17.   def process_normal_character(c, pos)
  18.     tmmessagese_window_message_process_normal_character(c, pos)
  19.     TMMESSAGESE::MESSAGE_SE.play if @se_flag
  20.   end
  21.   alias tmmessage_window_message_process_escape_character process_escape_character
  22.   def process_escape_character(code, text, pos)
  23.     case code.upcase
  24.     when 'B'
  25.       @se_flag ^= true
  26.     else
  27.       tmmessage_window_message_process_escape_character(code, text, pos)
  28.     end
  29.   end
  30. end
复制代码
拿去吧
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
85 小时
注册时间
2008-3-30
帖子
45
5
 楼主| 发表于 2012-7-21 14:04:41 | 只看该作者
杰总 发表于 2012-7-20 21:32
拿去吧

直接插入吗?提示第二行错误~请问怎么办
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
94
在线时间
191 小时
注册时间
2011-10-12
帖子
320
6
发表于 2012-7-21 17:09:25 | 只看该作者
  1. #这回好了,记得认可哦
  2.   MESSAGE_SE = RPG::SE.new("Cursor1", 80, 150)   
  3.   AUTO_SE = true   
  4.   
  5.   VN_MESSAGE_WAIT = 9
  6. end
  7. class Window_Message
  8.   alias tmmessagese_window_message_clear_flags clear_flags
  9.   def clear_flags
  10.     tmmessagese_window_message_clear_flags
  11.     @se_flag = TMMESSAGESE::AUTO_SE
  12.   end

  13.   alias tmessagese_window_message_wait_for_one_character wait_for_one_character
  14.   def wait_for_one_character
  15.     [$game_variables[TMMESSAGESE::VN_MESSAGE_WAIT], 1].max.times do |i|
  16.       tmessagese_window_message_wait_for_one_character
  17.     end
  18.   end

  19.   alias tmmessagese_window_message_process_normal_character process_normal_character
  20.   def process_normal_character(c, pos)  
  21.     tmmessagese_window_message_process_normal_character(c, pos)
  22.     TMMESSAGESE::MESSAGE_SE.play if @se_flag
  23.   end

  24.   alias tmmessage_window_message_process_escape_character process_escape_character
  25.   def process_escape_character(code, text, pos)
  26.     case code.upcase
  27.     when 'B'
  28.       @se_flag ^= true
  29.     else
  30.       tmmessage_window_message_process_escape_character(code, text, pos)
  31.     end
  32.   end
  33. end
复制代码
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
85 小时
注册时间
2008-3-30
帖子
45
7
 楼主| 发表于 2012-7-22 13:16:46 | 只看该作者
杰总 发表于 2012-7-21 17:09

第六行错误……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
94
在线时间
191 小时
注册时间
2011-10-12
帖子
320
8
发表于 2012-7-22 13:40:15 | 只看该作者
额..............
  1. #==============================================================================
  2. # ★ RGSS3_メッセージ効果音 Ver1.1
  3. #==============================================================================
  4. =begin

  5. 作者:tomoaky
  6. webサイト:ひきも記 (http://hikimoki.sakura.ne.jp/)

  7. 文章の表示コマンド実行時、文字の表示と一緒に効果音を鳴らします。

  8. 制御文字 \B を使って効果音を再生するかどうかを設定できます。
  9. \B が出てくるたびに切り替わりますが AUTO_SE が true の場合は
  10. 最初から効果音が鳴る状態になっています。

  11. おまけ機能として文章の表示速度を変更することができます。
  12. 設定したゲーム変数(初期設定では8番)の値が大きければ大きいほど
  13. 表示速度は遅くなります。1 がデフォルトの速度で最低値です。

  14. 使用するゲーム変数(初期設定)
  15.   0008
  16.   
  17. 2012.01.22  Ver1.1
  18.   おまけ機能の文章表示速度変更を追加
  19.   
  20. 2012.01.21  Ver1.0
  21.   公開

  22. =end

  23. #==============================================================================
  24. # □ 設定項目
  25. #==============================================================================
  26. module TMMESSAGESE
  27.   MESSAGE_SE = RPG::SE.new("Cursor1", 80, 150)    # 再生される効果音
  28.   AUTO_SE = true    # true で自動的に再生、false で制御文字があったときのみ再生
  29.   
  30.   VN_MESSAGE_WAIT = 9   # 文章の表示速度として扱うゲーム変数番号
  31. end

  32. #==============================================================================
  33. # ■ Window_Message
  34. #==============================================================================
  35. class Window_Message
  36.   #--------------------------------------------------------------------------
  37.   # ● フラグのクリア
  38.   #--------------------------------------------------------------------------
  39.   alias tmmessagese_window_message_clear_flags clear_flags
  40.   def clear_flags
  41.     tmmessagese_window_message_clear_flags
  42.     @se_flag = TMMESSAGESE::AUTO_SE
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● 一文字出力後のウェイト
  46.   #--------------------------------------------------------------------------
  47.   alias tmessagese_window_message_wait_for_one_character wait_for_one_character
  48.   def wait_for_one_character
  49.     [$game_variables[TMMESSAGESE::VN_MESSAGE_WAIT], 1].max.times do |i|
  50.       tmessagese_window_message_wait_for_one_character
  51.     end
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 通常文字の処理
  55.   #--------------------------------------------------------------------------
  56.   alias tmmessagese_window_message_process_normal_character process_normal_character
  57.   def process_normal_character(c, pos)
  58.     tmmessagese_window_message_process_normal_character(c, pos)
  59.     TMMESSAGESE::MESSAGE_SE.play if @se_flag
  60.   end
  61.   #--------------------------------------------------------------------------
  62.   # ● 制御文字の処理
  63.   #     code : 制御文字の本体部分(「\C[1]」なら「C」)
  64.   #     text : 描画処理中の文字列バッファ(必要なら破壊的に変更)
  65.   #     pos  : 描画位置 {:x, :y, :new_x, :height}
  66.   #--------------------------------------------------------------------------
  67.   alias tmmessage_window_message_process_escape_character process_escape_character
  68.   def process_escape_character(code, text, pos)
  69.     case code.upcase
  70.     when 'B'
  71.       @se_flag ^= true
  72.     else
  73.       tmmessage_window_message_process_escape_character(code, text, pos)
  74.     end
  75.   end
  76. end


复制代码
回复 支持 反对

使用道具 举报

Lv1.梦旅人

小黑

梦石
0
星屑
50
在线时间
140 小时
注册时间
2011-8-23
帖子
536
9
发表于 2012-7-22 14:35:20 | 只看该作者
怎么我感觉你想用人体语言输出啊,自己说话录下来播放不好吗?
起码对得起自己。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
33 小时
注册时间
2008-5-2
帖子
19
10
发表于 2012-7-31 09:57:28 | 只看该作者
NDS的逆转裁判玩多了的人完全可以理解想要这个脚本的心情!
我也正找这个呢,每次测试RMVA作品的时候对着一点声音都没有的对话那个别扭……
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-4 18:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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