查看: 3854|回复: 4

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

[复制链接]
梦石
0
星屑
29901
在线时间
5734 小时
注册时间
2016-3-8
回帖
1653
发表于 2020-9-14 11:14:52 | 显示全部楼层 |阅读模式

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

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

×
https://rpg.blue/home.php?mod=sp ... o=blog&id=14365
以前用喵大的时, 以为是有什么特別的原因才使某些指令不能被使用
但今天看到下方的脚本后, 测试了显示文章的指令, 好像又没有什么问题?
所以能请喵大说明一下你的不能用某些指令的原因么@喵呜喵5
[pre lang="ruby"]#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#             Run Common Event On Continue
#             Author: DiamondandPlatinum3
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Description:
#
#    This script allows you to run a common event when the player loads a
#     save game.
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#------------------------------------------------------------------------------
#  Instructions:
#
#  ~  Modify Editable Region to your liking.
#
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  This class performs load screen processing.
#==============================================================================

class Scene_Load < Scene_File
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  #                                                        -=
  #                 Editable Region        ////            ==
  #                                                        =-
  #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  
  # The Event ID of the Common Event that will be used when the player
  # loads a saved game
  COMMON_EVENT_ID_TO_RUN = 10
  
  # Load the save file with the Screen Faded Out?
  # This will allow you to set things up with the common event without
  # interupting the visuals on the screen.
  # Note: If true, you will need to use the "screen fadein" event when you are
  #       finished with the common event.
  ContinueScreenFadeout = false
  
  #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  #                                           \/
  #               End of Editable Region      /\
  #                                           \/
  #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  
  #--------------------------------------------------------------------------
  # * Processing When Load Is Successful
  #--------------------------------------------------------------------------
  alias dp3_sceneload_onloadsuccess_09qd8uj     on_load_success
  #--------------------------------------------------------------------------
  def on_load_success
    # Run Common Event
    $game_temp.reserve_common_event(COMMON_EVENT_ID_TO_RUN)
   
    # Call Original Method
    dp3_sceneload_onloadsuccess_09qd8uj()
   
    # Fadeout Screen
    $game_map.screen.start_fadeout(1) if ContinueScreenFadeout
  end
end[/pre]

梦石
1
星屑
23236
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

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

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

点评

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

评分

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

查看全部评分

回复

使用道具 举报

梦石
1
星屑
23236
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

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

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

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

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

点评

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

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部