| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2017-10-18 |
| 在线时间 | 105 小时 |
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 105 小时
- 注册时间
- 2016-4-3
- 回帖
- 50
|
楼主 |
发表于 2016-7-13 16:24:57
|
显示全部楼层
您好,我仔细看了下,确实我的工程还修改了一个地方,我将战斗命令的排列方式改成横排了,所以冲突
但是,但是工程传不上来,文件太大了,可否告知您的联系方式
我先将涉及到的3个脚本发到这里,您新建一个工程加入这3个脚本就可以发现BUG了:
第1个改动的地方(默认脚本,替换的):
第2个改动的地方(自定义脚本):
- #==============================================================================
- class Window_BattleCommand < Window_Selectable
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 180, 60)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.back_opacity = 160
- @commands = ["攻","技","防","物","逃"]
- @item_max = 5
- @column_max = 5
- refresh
- self.active = false
- self.visible = false
- self.index = 0
- end
- #---------------------------------------------------------------------------
- def refresh
- self.contents.clear
- for i in 0...@item_max
- draw_item(i)
- end
- end
- #--------------------------------------------------------------------------
- def draw_item(index)
- x = index % 5 * 30
- y = index / 5 * 30
- self.contents.font.color = normal_color
- self.contents.draw_text(x, y, 30, 30, @commands[index], 1)
- end
- #--------------------------------------------------------------------------
- def update_cursor_rect
- x = index % 5 * 30
- y = index / 5 * 30
- self.cursor_rect.set(x, y, 30, 30)
- end
- end
- #===============================================================================
复制代码
第3个改动的地方(自定义脚本,逃跑脚本):
- #=======================================================================
- # ■ 本脚本来自 [url]www.66rpg.com[/url] 转载和使用时请保留此信息
- #-----------------------------------------------------------------------
- # 脚本功能:去掉战斗开始时候的 战斗/逃跑 的选择过程.
- # 并把逃跑加入到角色命令菜单当中
- # 脚本作者:后知后觉 2010-8-11 13:46:59
- # 使用方法:直接在 Main 前插入即可
- #=======================================================================
- class Window_PartyCommand < Window_Selectable
- def visible=(value)
- super(false)
- end
- def active=(value)
- super(false)
- end
- end
- class Scene_Battle
- alias hzhj_old_start_phase1 start_phase1
- def start_phase1
- class << @actor_command_window
- attr_reader :commands
- def commands=(value)
- @commands = value
- @item_max = @commands.size
- self.height = @item_max * 32 + 32
- self.y = [self.y - 32, 0].max
- self.contents.dispose
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- end
- end
- commands = @actor_command_window.commands
- commands.push("撤退")
- @actor_command_window.commands = commands
- unless $game_temp.battle_can_escape
- @actor_command_window.disable_item(commands.size - 1)
- end
- hzhj_old_start_phase1
- end
- alias hzhj_old_start_phase2 start_phase2
- def start_phase2
- hzhj_old_start_phase2
- if @phase == 2
- start_phase3
- end
- end
- alias hzhj_old_update_phase3_basic_command update_phase3_basic_command
- def update_phase3_basic_command
- hzhj_old_update_phase3_basic_command
- if Input.trigger?(13)
- if @actor_command_window.index == @actor_command_window.commands.size - 1
- unless $game_temp.battle_can_escape
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- $game_system.se_play($data_system.decision_se)
- update_phase2_escape
- return
- end
- end
- end
- end
- #=======================================================================
- # ■ 本脚本来自 [url]www.66rpg.com[/url] 转载和使用时请保留此信息
- #=======================================================================
复制代码 |
|