1.jpg (212.89 KB, 下载次数: 23)
2.jpg (236 KB, 下载次数: 23)
#將圖檔命名為123置於Graphics\System #------------------------------------------- class Scene_Battle < Scene_Base alias QCHW create_help_window def create_help_window @help_window = Window_Help.new @help_window.visible = false @help_window.opacity=0 end alias QCS command_skill def command_skill create_menu_background @skill_window.opacity=0 @skill_window.actor = BattleManager.actor @skill_window.stype_id = @actor_command_window.current_ext @skill_window.refresh @skill_window.show.activate end #-------------------------------------------------------------------------- # ● 指令“物品” #-------------------------------------------------------------------------- alias QCI command_item def command_item @item_window.opacity=0 create_menu_background @item_window.refresh @item_window.show.activate end #-------------------------------------------------------------------------- # ● 技能“確定” #-------------------------------------------------------------------------- alias QSOK on_skill_ok def on_skill_ok dispose_menu_background [url=home.php?mod=space&uid=260100]@skill[/url] = @skill_window.item BattleManager.actor.input.set_skill(@skill.id) BattleManager.actor.last_skill.object = @skill if !@skill.need_selection? @skill_window.hide next_command elsif @skill.for_opponent? select_enemy_selection else select_actor_selection end end #-------------------------------------------------------------------------- # ● 技能“取消” #-------------------------------------------------------------------------- alias QSC on_skill_cancel def on_skill_cancel @skill_window.hide @actor_command_window.activate dispose_menu_background end #-------------------------------------------------------------------------- # ● 物品“確定” #-------------------------------------------------------------------------- alias QIOK on_item_ok def on_item_ok dispose_menu_background @item = @item_window.item BattleManager.actor.input.set_item(@item.id) if !@item.need_selection? @item_window.hide next_command elsif @item.for_opponent? select_enemy_selection else select_actor_selection end $game_party.last_item.object = @item end #-------------------------------------------------------------------------- # ● 物品“取消” #-------------------------------------------------------------------------- alias QIC on_item_cancel def on_item_cancel @item_window.hide @actor_command_window.activate dispose_menu_background end def on_enemy_cancel @enemy_window.hide create_menu_background case @actor_command_window.current_symbol when :attack @actor_command_window.activate when :skill @skill_window.activate when :item @item_window.activate end end def create_menu_background @menu_background = Sprite.new @menu_background.bitmap = Cache.system('123') end def dispose_menu_background @menu_background.bitmap.dispose @menu_background.dispose end end
QQ蚊子湯 发表于 2016-10-24 04:38
嗯. ..你已經用了戰鬥腳本了
我不知道你那個橫版會不會衝突,所以我就用新專案寫一個
#將圖檔命名為123置於Graphics\System #------------------------------------------- class Scene_Battle < Scene_Base alias QCHW create_help_window def create_help_window @help_window = Window_Help.new @help_window.visible = false @help_window.opacity=0 end alias QCS command_skill def command_skill create_menu_background @skill_window.opacity=0 @skill_window.actor = BattleManager.actor @skill_window.stype_id = @actor_command_window.current_ext @skill_window.refresh @skill_window.show.activate end #-------------------------------------------------------------------------- # ● 指令“物品” #-------------------------------------------------------------------------- alias QCI command_item def command_item @item_window.opacity=0 create_menu_background @item_window.refresh @item_window.show.activate end #-------------------------------------------------------------------------- # ● 技能“確定” #-------------------------------------------------------------------------- alias QSOK on_skill_ok def on_skill_ok dispose_menu_background [url=home.php?mod=space&uid=260100]@skill[/url] = @skill_window.item BattleManager.actor.input.set_skill(@skill.id) BattleManager.actor.last_skill.object = @skill if !@skill.need_selection? @skill_window.hide next_command elsif @skill.for_opponent? select_enemy_selection else select_actor_selection end end #-------------------------------------------------------------------------- # ● 技能“取消” #-------------------------------------------------------------------------- alias QSC on_skill_cancel def on_skill_cancel @skill_window.hide @actor_command_window.activate dispose_menu_background end #-------------------------------------------------------------------------- # ● 物品“確定” #-------------------------------------------------------------------------- alias QIOK on_item_ok def on_item_ok dispose_menu_background @item = @item_window.item BattleManager.actor.input.set_item(@item.id) if !@item.need_selection? @item_window.hide next_command elsif @item.for_opponent? select_enemy_selection else select_actor_selection end $game_party.last_item.object = @item end #-------------------------------------------------------------------------- # ● 物品“取消” #-------------------------------------------------------------------------- alias QIC on_item_cancel def on_item_cancel @item_window.hide @actor_command_window.activate dispose_menu_background end def on_enemy_cancel @enemy_window.hide create_menu_background case @actor_command_window.current_symbol when :attack @actor_command_window.activate dispose_menu_background when :skill @skill_window.activate when :item @item_window.activate end end def create_menu_background @menu_background = Sprite.new @menu_background.bitmap = Cache.system('123') end def dispose_menu_background @menu_background.bitmap.dispose @menu_background.dispose end end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |