赞 | 17 |
VIP | 0 |
好人卡 | 20 |
积分 | 36 |
经验 | 47059 |
最后登录 | 2022-9-28 |
在线时间 | 2337 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3559
- 在线时间
- 2337 小时
- 注册时间
- 2015-8-25
- 帖子
- 960
|
本帖最后由 七重 于 2016-9-29 14:32 编辑
- class Scene_Save < Scene_File
- alias krst_on_save_success on_save_success
- def on_save_success
- miao = 1
- Sound.play_save
- $game_variables[@index+miao] = Graphics.frame_count
- return_scene
- end
- end
复制代码
这样可以将游戏的进行帧数记录在变量里,每60帧是1秒。
如果想记录现实时间的话就是:
$game_variables[n]=Time.now.hour
$game_variables[m]=Time.now.min
这样的脚本。
假如说,想要知道存档1的游戏时间是否比存档2长。
那就是事件指令→条件分支,判断变量0001的数值 是否大于 变量0002 。
默认是将存档1的游戏时长存在变量1中。 |
|