赞 | 1 |
VIP | 220 |
好人卡 | 25 |
积分 | 7 |
经验 | 51477 |
最后登录 | 2013-1-12 |
在线时间 | 943 小时 |
Lv2.观梦者 花开堪折直须折
- 梦石
- 0
- 星屑
- 676
- 在线时间
- 943 小时
- 注册时间
- 2010-7-17
- 帖子
- 4963
|
如果純粹的事件任務的話,利用開關、變量、對話、選項、條件分歧等編輯器內的工具就可以完成……如果要用到任務腳本的話,建議看看流星姐從xp葉子任務轉成vx的版本……地址http://rpg.blue/forum.php?mod=viewthread&tid=76639&highlight=%E5%8F%B6%E5%AD%90%2B%E4%BB%BB%E5%8A%A1
$scene = Scene_Task.new 召喚任務介面 ,插在菜單中的話,在scene_menu的59行 “s6 = Vocab::game_end”下面,另起一行插入“s7 = "任務"” ,(如圖)
然後,把下一行“ @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) ”替換成“ @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7]) ”- #--------------------------------------------------------------------------
- # ● 更新指令选择
- #--------------------------------------------------------------------------
- def update_command_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Map.new
- elsif Input.trigger?(Input::C)
- if $game_party.members.size == 0 and @command_window.index < 4
- Sound.play_buzzer
- return
- elsif $game_system.save_disabled and @command_window.index == 4
- Sound.play_buzzer
- return
- end
- Sound.play_decision
- case @command_window.index
- when 0 # 物品
- $scene = Scene_Item.new
- when 1,2,3 # 特技、装备、状态
- start_actor_selection
- when 4 # 存档
- $scene = Scene_File.new(true, false, false)
- when 5 # 游戏结束
- $scene = Scene_End.new
- end
- end
- end
复制代码 在end前、$scene = Scene_End.new下面另起一行,插入:- when 6 #任務
- $scene = Scene_Task.new
复制代码 就可以了,成功後整個菜單的腳本是:- #==============================================================================
- # ■ Scene_Menu
- #------------------------------------------------------------------------------
- # 处理菜单画面的类。
- #==============================================================================
- class Scene_Menu < Scene_Base
- #--------------------------------------------------------------------------
- # ● 初始化对象
- # menu_index : 指令光标初期位置
- #--------------------------------------------------------------------------
- def initialize(menu_index = 0)
- @menu_index = menu_index
- end
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- create_menu_background
- create_command_window
- @gold_window = Window_Gold.new(0, 360)
- @status_window = Window_MenuStatus.new(160, 0)
- end
- #--------------------------------------------------------------------------
- # ● 结束处理
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_menu_background
- @command_window.dispose
- @gold_window.dispose
- @status_window.dispose
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- update_menu_background
- @command_window.update
- @gold_window.update
- @status_window.update
- if @command_window.active
- update_command_selection
- elsif @status_window.active
- update_actor_selection
- end
- end
- #--------------------------------------------------------------------------
- # ● 生成指令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- s1 = Vocab::item
- s2 = Vocab::skill
- s3 = Vocab::equip
- s4 = Vocab::status
- s5 = Vocab::save
- s6 = Vocab::game_end
- s7 = "任務"
- @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
- @command_window.index = @menu_index
- if $game_party.members.size == 0 # 同伴人数为 0 的情况下
- @command_window.draw_item(0, false) # 物品无效化
- @command_window.draw_item(1, false) # 特技无效化
- @command_window.draw_item(2, false) # 装备无效化
- @command_window.draw_item(3, false) # 状态无效化
- end
- if $game_system.save_disabled # 禁止存档的情况下
- @command_window.draw_item(4, false) # 存档无效化
- end
- end
- #--------------------------------------------------------------------------
- # ● 更新指令选择
- #--------------------------------------------------------------------------
- def update_command_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Map.new
- elsif Input.trigger?(Input::C)
- if $game_party.members.size == 0 and @command_window.index < 4
- Sound.play_buzzer
- return
- elsif $game_system.save_disabled and @command_window.index == 4
- Sound.play_buzzer
- return
- end
- Sound.play_decision
- case @command_window.index
- when 0 # 物品
- $scene = Scene_Item.new
- when 1,2,3 # 特技、装备、状态
- start_actor_selection
- when 4 # 存档
- $scene = Scene_File.new(true, false, false)
- when 5 # 游戏结束
- $scene = Scene_End.new
- when 6 #任務
- $scene = Scene_Task.new
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● アクター選択の開始
- #--------------------------------------------------------------------------
- def start_actor_selection
- @command_window.active = false
- @status_window.active = true
- if $game_party.last_actor_index < @status_window.item_max
- @status_window.index = $game_party.last_actor_index
- else
- @status_window.index = 0
- end
- end
- #--------------------------------------------------------------------------
- # ● アクター選択の終了
- #--------------------------------------------------------------------------
- def end_actor_selection
- @command_window.active = true
- @status_window.active = false
- @status_window.index = -1
- end
- #--------------------------------------------------------------------------
- # ● アクター選択の更新
- #--------------------------------------------------------------------------
- def update_actor_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- end_actor_selection
- elsif Input.trigger?(Input::C)
- $game_party.last_actor_index = @status_window.index
- Sound.play_decision
- case @command_window.index
- when 1 # スキル
- $scene = Scene_Skill.new(@status_window.index)
- when 2 # 装備
- $scene = Scene_Equip.new(@status_window.index)
- when 3 # ステータス
- $scene = Scene_Status.new(@status_window.index)
- end
- end
- end
- end
复制代码 另外,get_task(編號) 為接受任務, finish_task(編號)為完成/刪除任務
其他詳細設置看原帖……
好吧 我承認我在培養伸手黨 我以後再也不這麼做了 = .= |
评分
-
查看全部评分
|