本帖最后由 15968715431 于 2015-12-2 15:26 编辑
流浪杰哥 发表于 2015-12-2 14:46
确实是可以了,不过角色命令窗口看不见了,试着调整@actor_command_window.x坐标,发现竟然没有用,不知 ...
这个 脚本 可以把战斗、撤退加入到指令中。
然后刚才那数值是调整到128 试试。
class Scene_Battle < Scene_Base def start_party_command_selection unless scene_changing? refresh_status @status_window.unselect @status_window.open if BattleManager.input_start @actor_command_window.close command_fight else @party_command_window.deactivate turn_start end end end def create_actor_command_window @actor_command_window = Window_ActorCommand.new @actor_command_window.viewport = @info_viewport @actor_command_window.set_handler(:attack, method(:command_attack)) @actor_command_window.set_handler(:skill, method(:command_skill)) @actor_command_window.set_handler(:guard, method(:command_guard)) @actor_command_window.set_handler(:item, method(:command_item)) @actor_command_window.set_handler(:escape, method(:command_escape)) @actor_command_window.set_handler(:cancel, method(:prior_command)) @actor_command_window.x = Graphics.width end end class Window_ActorCommand < Window_Command def make_command_list return unless @actor add_attack_command add_skill_commands add_guard_command add_item_command add_escape_command end def add_escape_command add_command(Vocab::escape, :escape, BattleManager.can_escape?) end end
class Scene_Battle < Scene_Base
def start_party_command_selection
unless scene_changing?
refresh_status
@status_window.unselect
@status_window.open
if BattleManager.input_start
@actor_command_window.close
command_fight
else
@party_command_window.deactivate
turn_start
end
end
end
def create_actor_command_window
@actor_command_window = Window_ActorCommand.new
@actor_command_window.viewport = @info_viewport
@actor_command_window.set_handler(:attack, method(:command_attack))
@actor_command_window.set_handler(:skill, method(:command_skill))
@actor_command_window.set_handler(:guard, method(:command_guard))
@actor_command_window.set_handler(:item, method(:command_item))
@actor_command_window.set_handler(:escape, method(:command_escape))
@actor_command_window.set_handler(:cancel, method(:prior_command))
@actor_command_window.x = Graphics.width
end
end
class Window_ActorCommand < Window_Command
def make_command_list
return unless @actor
add_attack_command
add_skill_commands
add_guard_command
add_item_command
add_escape_command
end
def add_escape_command
add_command(Vocab::escape, :escape, BattleManager.can_escape?)
end
end
|