扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 154|回复: 0

[转载发布] [Scene篇]简陋任务列表

[复制链接]
累计送礼:
0 个
累计收礼:
0 个
  • TA的每日心情
    开心
    昨天 18:01
  • 签到天数: 114 天

    连续签到: 4 天

    [LV.6]常住居民II

    2338

    主题

    403

    回帖

    1万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    6
    卡币
    10632
    OK点
    16
    推广点
    0
    同能卷
    0
    积分
    13401

    灌水之王

    发表于 2024-4-19 18:55:39 | 显示全部楼层 |阅读模式
    喵,咱只是尝试写一个Scene,很渣,各位就不要吐槽了,非常简陋,范例就不发了。
    感谢EngShun纠正错误喵~





    于是还是比较朴实啦~
    以下献给新手
    1.插入下面的脚本在main以上
    2.进入游戏按Z键呼出任务列表
    3.变量100控制任务进度
    4.脚本42行修改任务描述

    喵就这样了
    1. 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.dispose  end  def update    @help_window.update    @item_window.update    if @item_window.active      update_item      return    end  end  def update_item    if Input.trigger?(Input::B)      $game_system.se_play($data_system.cancel_se)      $scene = Scene_Map.new      return    end  end  end########################################################class Window_Fux2 < Window_Selectable    FUX_BLOCK = [["任务1","杀死所有敌人"],["任务2","喵喵"]]  def initialize    super(0, 64, 640, 416)    @column_max = 1    refresh    self.index = 0  end  def item    return @data[self.index]  end  def refresh    if self.contents != nil      self.contents.dispose      self.contents = nil    end    @data = []        for i in 0...$game_variables[100]        @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    end  end  def draw_item(index)    item = @data[index]    @data[index] == @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[index][0], 0)  end  def update_help    @help_window.set_text(self.item == nil ? "" : FUX_BLOCK[self.index][1])  end  end########################################class Scene_Map  alias: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    end  endend复制代码
    复制代码
                本帖来自P1论坛作者血のばら,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=164027  若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2025-3-15 04:39 , Processed in 0.131839 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表