赞 | 5 |
VIP | 71 |
好人卡 | 22 |
积分 | 6 |
经验 | 32145 |
最后登录 | 2013-8-9 |
在线时间 | 184 小时 |
Lv2.观梦者 天仙
- 梦石
- 0
- 星屑
- 620
- 在线时间
- 184 小时
- 注册时间
- 2008-4-15
- 帖子
- 5023
|
以下引用LongLife長生于2009-6-2 17:20:53的发言:
叫的OK了!不過為什麽走路的時候也會叫呢……
囧
持续伤害没弄好......改好了
- $actor_no_scream = false # 设定角色是否惨叫,true 为不惨叫
- $enemy_no_scream = false # 设定敌人是否惨叫,true 为不惨叫
- module Sound
- def self.play_scream(index, actor=true)
- filename = "scream1"
- if actor
- # 设定角色1-4号的喊叫声
- filename = ["scream1", "scream2", "scream3", "scream4"][index-1]
- else
- # 设定敌人1-8号的喊叫声
- filename = ["scream1", "scream2", "scream3", "scream4",
- "scream1", "scream2", "scream3", "scream4"][index-1]
- end
- filename = "Audio/SE/" + filename + ".ogg"
- Audio.se_play(filename)
- end
- def self.play_groan(gender, actor=true)
- gender %= 2
- filename = "groan1"
- filename = ["", "groan1", "groan2"][gender]
- filename = "Audio/SE/" + filename + ".ogg"
- Audio.se_play(filename)
- end
- end
- class Game_Battler
- alias sound_slip_damage_effect slip_damage_effect
- def slip_damage_effect
- return unless scream?
- Sound.play_groan(actor? ? @actor_id : @enemy_id, actor?)
- sound_slip_damage_effect
- end
- alias sound_execute_damage execute_damage
- def execute_damage(user)
- return unless scream?
- Sound.play_scream(actor? ? @actor_id : @enemy_id, actor?)
- sound_execute_damage(user)
- end
- def scream?
- if actor?
- return !$actor_no_scream
- else
- return !$enemy_no_scream
- end
- end
- end
复制代码 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|