Project1
标题:
有没有资源采集系统?
[打印本页]
作者:
lirn
时间:
2013-5-11 11:25
标题:
有没有资源采集系统?
本帖最后由 lirn 于 2013-5-13 10:36 编辑
就是关于可重复采集
通过等待多少帧,或者公共开关变量的方法,我懂,但是这些东西各有缺点。等待多少帧的话与剧情行进无关,暂时消失一切换地图就会重置,公共开关变量的话数量一多起来就会很麻烦。
有没有其他方法可以在睡一觉才会重置这类事件的方法?
作者:
光の異形
时间:
2013-5-11 11:28
就是说 等一定时间 资源才可以再生再调查时才能得到 这样吗?
感觉是一个真实的 时间系统嘛 其实 蛮简单的
作者:
光の異形
时间:
2013-5-11 12:42
本帖最后由 光の異形 于 2013-5-11 13:10 编辑
我懂了 就是采集过了的 就没有了 其他的还在 然后 要等剧情 才一起全部刷出来 这样啊 等我想想 马上好
话说 怎么样都 不能做得很简单呢
不过可以做到 减少暂用的 开关和变量
作者:
Sion
时间:
2013-5-11 17:38
# 说明:
# 事件中插入脚本 collected ,启动后事件消失
# 要刷新全部采集事件,事件中运行脚本 refresh_collected
class Game_Event
alias conditions_met_2013_5_11? conditions_met?
def conditions_met?(page)
return false if $game_self_switches[[@map_id, @id, :collected]]
conditions_met_2013_5_11?(page)
end
end
class Game_Interpreter
def collected
$game_self_switches[[@map_id, @event_id, :collected]] = true
end
def refresh_collected
$game_self_switches.refresh_collected_events
end
end
class Game_SelfSwitches
def refresh_collected_events
@data.delete_if {|key| key[2] == :collected}
end
end
复制代码
作者:
lirn
时间:
2013-5-11 17:58
Sion 发表于 2013-5-11 17:38
5.png
(7.5 KB, 下载次数: 23)
下载附件
保存到相册
2013-5-11 17:58 上传
使用方法是这样吗?
作者:
光の異形
时间:
2013-5-13 08:31
Sion 发表于 2013-5-11 17:38
虽然吾辈也知道怎么用 地图ID 事件ID 来定位操作事件
不过 这不是吾辈最想要的脚本版本吗? 超级有用啊 ~!!!!!!!!!
只用来资源采集系统绝对是可耻的浪费啊 ·····················
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1