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

Project1

 找回密码
 注册会员
搜索
查看: 2956|回复: 4

[已经解决] 喵呜喵5读档后執行公共事件不支持某些指令的原因是?

[复制链接]

Lv5.捕梦者

梦石
0
星屑
24057
在线时间
4983 小时
注册时间
2016-3-8
帖子
1613
发表于 2020-9-14 11:14:52 | 显示全部楼层 |阅读模式

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

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

x
https://rpg.blue/home.php?mod=sp ... o=blog&id=14365
以前用喵大的时, 以为是有什么特別的原因才使某些指令不能被使用
但今天看到下方的脚本后, 测试了显示文章的指令, 好像又没有什么问题?
所以能请喵大说明一下你的不能用某些指令的原因么@喵呜喵5
RUBY 代码复制
  1. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. #             Run Common Event On Continue
  3. #             Author: DiamondandPlatinum3
  4. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. #  Description:
  6. #
  7. #    This script allows you to run a common event when the player loads a
  8. #     save game.
  9. #
  10. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11. #------------------------------------------------------------------------------
  12. #  Instructions:
  13. #
  14. #  ~  Modify Editable Region to your liking.
  15. #
  16. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  17.  
  18.  
  19.  
  20. #==============================================================================
  21. # ** Scene_Load
  22. #------------------------------------------------------------------------------
  23. #  This class performs load screen processing.
  24. #==============================================================================
  25.  
  26. class Scene_Load < Scene_File
  27.   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  28.   #                                                        -=
  29.   #                 Editable Region        ////            ==
  30.   #                                                        =-
  31.   #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  32.  
  33.   # The Event ID of the Common Event that will be used when the player
  34.   # loads a saved game
  35.   COMMON_EVENT_ID_TO_RUN = 10
  36.  
  37.   # Load the save file with the Screen Faded Out?
  38.   # This will allow you to set things up with the common event without
  39.   # interupting the visuals on the screen.
  40.   # Note: If true, you will need to use the "screen fadein" event when you are
  41.   #       finished with the common event.
  42.   ContinueScreenFadeout = false
  43.  
  44.   #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  45.   #                                           \/
  46.   #               End of Editable Region      /\
  47.   #                                           \/
  48.   #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  49.  
  50.   #--------------------------------------------------------------------------
  51.   # * Processing When Load Is Successful
  52.   #--------------------------------------------------------------------------
  53.   alias dp3_sceneload_onloadsuccess_09qd8uj     on_load_success
  54.   #--------------------------------------------------------------------------
  55.   def on_load_success
  56.     # Run Common Event
  57.     $game_temp.reserve_common_event(COMMON_EVENT_ID_TO_RUN)
  58.  
  59.     # Call Original Method
  60.     dp3_sceneload_onloadsuccess_09qd8uj()
  61.  
  62.     # Fadeout Screen
  63.     $game_map.screen.start_fadeout(1) if ContinueScreenFadeout
  64.   end
  65. end

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
20835
在线时间
9324 小时
注册时间
2012-6-19
帖子
7105

开拓者短篇九导演组冠军

发表于 2020-9-14 13:38:07 | 显示全部楼层
简单点说就是我把无法瞬间完成的那些指令给掐掉了

防止遇到各种奇奇怪怪的存档脚本

点评

这样喔, 那我还是保險些, 不用外站的那个好了  发表于 2020-9-14 18:32

评分

参与人数 1+1 收起 理由
alexncf125 + 1 塞糖

查看全部评分

回复 支持 反对

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
20835
在线时间
9324 小时
注册时间
2012-6-19
帖子
7105

开拓者短篇九导演组冠军

发表于 2020-9-14 21:40:50 | 显示全部楼层
其实没什么区别,外站那个也是瞬间执行的,只是他执行的是把要执行的公共事件加入了公共事件待执行列表

用我的脚本在公共事件中启动另一个公共事件也能达成相同的效果

我的脚本和它的脚本的区别在于,他只做了加入公共事件待执行列表这一步,剩下的执行流程全部交给现有的公共事件机制去处理,(所以如果存档的时机是奇奇怪怪的例如剧情半中间存了档,那可能导致相应的内容延迟执行了)
我的脚本则是卡住当前的读档流程,保证所有配置的内容都执行结束后才继续读档(作为代价,无法瞬间完成的那些指令会因此卡死读档的流程)

大部分情况下,这两者没有任何区别,你用哪个都行

点评

我的存档时机就是奇奇怪怪的~在地图上每三分钟就会自动存档一次(即使在剧情半中间)  发表于 2020-9-14 21:52
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-3-29 08:24

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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