设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2673|回复: 3
打印 上一主题 下一主题

[已经解决] 请问:怎么做采集系统

[复制链接]

Lv1.梦旅人

梦石
0
星屑
49
在线时间
469 小时
注册时间
2010-8-23
帖子
493
跳转到指定楼层
1
发表于 2010-10-18 05:42:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
比如说,一个采集点,你去采集可以得到物品,过一段会(按照步数决定)又可以去采集。

Lv3.寻梦者

梦石
0
星屑
1323
在线时间
831 小时
注册时间
2007-12-25
帖子
1558
2
发表于 2010-10-18 07:45:06 | 只看该作者
每次采集完用变量记录步数,下一次采集的时候判断步数差。

评分

参与人数 3星屑 +700 收起 理由
八云紫 + 700 认可答案
wangswz + 2 我来组成头部
fux2 -2 正解~~我是来捣乱的

查看全部评分

精卫赤龙腾   
总是存在一种强大,去完成似乎不可能的事情.
无畏战乾程   
或是需要一种勇气,去挑战几乎不存在的胜利.
一味玄真魂     
这是拥有一种恒心,去化解根本没有解的困难.
烈卫开天径    
只是带着一种决心,去争取残存的最后的希望。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

小莹爱水区

梦石
0
星屑
60
在线时间
163 小时
注册时间
2010-9-18
帖子
1085
3
发表于 2010-10-18 17:20:52 | 只看该作者
采集系统:(不是原创)
在Main  插入此脚本!
在事件里输入脚本
$scene = Scene_Collection
接有采集画面了
哈哈   

######################################################################
class Window_Collection < Window_Selectable
  def initialize
    super(240, 200, 120, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 160
    refresh
  end
  def refresh
    self.contents.clear
    #self.contents.draw_text(4, 20, 40, 32, "采集……", 2)
  end
  def update(t)
    @t = t
    for i in 0..@t
      self.contents.font.color = Color.new(32, 255, 32, 160)
      self.contents.draw_text(4, 0, 80, 32, "采集中……", 0)
      self.contents.font.color = Color.new(200, 200, 200, 160)
      self.contents.draw_text(4 + i * 4, 32, 4 ,20, "█", 0)
    end
  end  
end

class Window_Collection_End < Window_Selectable
  def initialize
    super(240, 200, 120, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    update
  end
  def refresh
    self.contents.clear
  end
  def update
    self.contents.draw_text(4, 10, 80, 32, "得到 花 1 个")
  end
end

class Scene_Collection
  def main
    @spriteset = Spriteset_Map.new
    @message_window = Window_Message.new
    @i = 1   
    @collection_window = Window_Collection.new
    @wait_count = 20
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        return
      end
    end
    Graphics.freeze   
  end
  def update
    if @wait_count != 0
      @wait_count -= 1
      return
    elsif @i <= 20
      @collection_window.update(@i)
      @i += 1
      @wait_count = 20
      return
    else
      @collection_window.dispose
      update_collection_window
      @wait_count = 20
      return
    end        
  end
  def update_collection_window
    @collection_end_window = Window_Collection_End.new
    @wait_count = 160
    @collection_end_window.dispose
    $scene = Scene_Map.new   
  end
end
###################################################################
如果觉得我的答案好请在http://rpg.blue/thread-155979-1-1.html
回复:http://rpg.blue/thread-158881-1-1.html 认可莹的赎生
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
244 小时
注册时间
2010-10-18
帖子
445
4
发表于 2010-11-4 14:40:10 | 只看该作者
这个我想可以实现..不用步数
直接变量+条件分歧吧?..变量1-10..比如说只有变量1.2.3采集成功.
其余都失败.采集成功的情况下.XX变量+1..新建一个事件页.
当XX变量为XX的时候.显示文章:"这里已经采集完了..请保护环境.避免过度采集"

点评

就是随机数神马的么……  发表于 2010-11-6 20:33
我不再捣蛋了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-20 21:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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