[Scene篇]简陋任务列表
喵,咱只是尝试写一个Scene,很渣,各位就不要吐槽了,非常简陋,范例就不发了。感谢EngShun纠正错误喵~
于是还是比较朴实啦~
以下献给新手
1.插入下面的脚本在main以上
2.进入游戏按Z键呼出任务列表
3.变量100控制任务进度
4.脚本42行修改任务描述
喵就这样了class Scene_Fux2 def main @help_window = Window_Help.new @item_window = Window_Fux2.new @item_window.help_window = @help_window Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @help_window.dispose @item_window.disposeenddef update @help_window.update @item_window.update if @item_window.active update_item return endenddef update_item if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return endendend########################################################class Window_Fux2 < Window_Selectable FUX_BLOCK = [["任务1","杀死所有敌人"],["任务2","喵喵"]]def initialize super(0, 64, 640, 416) @column_max = 1 refresh self.index = 0enddef item return @dataenddef refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] for i in 0...$game_variables @data.push i end @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end endenddef draw_item(index) item = @data @data == @data.size ? self.contents.font.color = Color.new(255, 255, 0, 255) : self.contents.font.color = normal_color x = 12 y = index * 32 rect = Rect.new(x, y, self.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.draw_text(x + 28, y, 212, 32, FUX_BLOCK, 0)enddef update_help @help_window.set_text(self.item == nil ? "" : FUX_BLOCK)endend########################################class Scene_Mapalias:fuxupdate:update def update unless moving? or $game_system.map_interpreter.running? or @move_route_forcing or $game_temp.message_window_showing if Input.trigger?(Input::A) $scene = Scene_Fux2.new end fuxupdate endendend复制代码
本帖来自P1论坛作者血のばら,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=164027若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
页:
[1]