查看: 3315|回复: 4

[已经解决] 慢镜头脚本总是出错

[复制链接]
梦石
0
星屑
584
在线时间
448 小时
注册时间
2009-6-8
回帖
55
发表于 2018-10-13 01:13:56 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 sexypunk 于 2018-10-13 06:48 编辑

yai guo wai wang zhan shang zhao dao de jiao ben bu tai hui yong,111 hang zong shi chu cuo "name error undefined method update for class game_system"
bu tai hui yong
qing jiao zen me gai?
hai you wo de dian nao xi tong mei you zhong wen qing jian liang.

xia mian shi jiao ben

  1. ###--------------------------------------------------------------------------###
  2. #  Slo-mo script                                                               #
  3. #  Version 1.0                                                                 #
  4. #                                                                              #
  5. #      Credits:                                                                #
  6. #  Original code by: Neonblack                                                 #
  7. #  Modified by:                                                                #
  8. #                                                                              #
  9. #  This work is licensed under the Creative Commons Attribution-NonCommercial  #
  10. #  3.0 Unported License. To view a copy of this license, visit                 #
  11. #  http://creativecommons.org/licenses/by-nc/3.0/.                             #
  12. #  Permissions beyond the scope of this license are available at               #
  13. #  http://cphouseset.wordpress.com/liscense-and-terms-of-use/.                 #
  14. #                                                                              #
  15. #      Contact:                                                                #
  16. #  NeonBlack - neonblack23@live.com (e-mail) or "neonblack23" on skype         #
  17. ###--------------------------------------------------------------------------###

  18. ###--------------------------------------------------------------------------###
  19. #      Revision information:                                                   #
  20. #  V1.0 - 10.29.2011                                                           #
  21. #   Wrote and debugged main script                                             #
  22. ###--------------------------------------------------------------------------###

  23. ###--------------------------------------------------------------------------###
  24. #      Compatibility:                                                          #
  25. #  Alias       - Game_System: initialize, update                               #
  26. #                Sprite_Character: update                                      #
  27. #                Scene_Map: perform_battle_transition                          #
  28. #                Scene_Menu: initialize                                        #
  29. #  New Classes - Game_FrameRate                                                #
  30. #  New Objects - Game_FrameRate: initialize, update, glitch_test               #
  31. ###--------------------------------------------------------------------------###

  32. ###--------------------------------------------------------------------------###
  33. #      Instructions:                                                           #
  34. #  Place this script in the "Materials" section of the scripts above main.     #
  35. #  This script is pretty much plug and play with a few options available to    #
  36. #  change below.  Using the script is as simple as changing a single           #
  37. #  variable.  To enter slo-mo, simply change the pre-defined variable.         #
  38. #  Since changing the framerate affects pretty much everything on screen and   #
  39. #  everything in an event, caution is advised when using this script.          #
  40. ###--------------------------------------------------------------------------###

  41. ###--------------------------------------------------------------------------###
  42. #      Config:                                                                 #
  43. #  These are the default values used by several of the functions in the        #
  44. #  script.  You may change these values as you find your game requires in      #
  45. #  order to give the player a better playing experience based on your game.    #
  46. #                                                                              #
  47. # The default variable used for the frame rate.  Changing this variable at     #
  48. # any time in game will result in a modified frame rate.                       #
  49. SET_FPS_VARIABLE = 27 # Default = 27                                           #
  50. #                                                                              #
  51. # The default "slow" value.  While the framerate is this value or below, all   #
  52. # events on screen change to "add" blending mode to make slo-mo mode a little  #
  53. # more fancy.  Set this value to 9 or below to disable it.                     #
  54. SLOMO_BLEND_EFFECT = 30 # Default = 30                                         #
  55. #                                                                              #
  56. # The default min and max values for FPS.  These limit what your min and max   #
  57. # values can be in game to prevent large scale bugs.  Even if you set them     #
  58. # higher or lower, the RGSS2 core engine cannot use frame rates lower than 10  #
  59. # or higher than 120.                                                          #
  60. LIMIT_FPS_MAX = 60 # Default = 60                                              #
  61. LIMIT_FPS_MIN = 30 # Default = 30                                              #
  62. #                                                                              #
  63. ###--------------------------------------------------------------------------###


  64. ###--------------------------------------------------------------------------###
  65. #  The following lines are the actual core code of the script.  While you are  #
  66. #  certainly invited to look, modifying it may result in undesirable results.  #
  67. #  Modify at your own risk!                                                    #
  68. ###--------------------------------------------------------------------------###


  69. # New class  -  Controls the framerate in game if it is changed by a controller.
  70. class Game_FrameRate
  71.   def initialize
  72.     # Nothing here!  Is that even allowed?  In any case, this is a placeholder.
  73.   end
  74.   
  75.   def update
  76.     new_fps = $game_variables[SET_FPS_VARIABLE]
  77.     new_fps = 60 if new_fps < 10
  78.     new_fps = glitch_test(new_fps)
  79.     if not $scene.is_a?(Scene_Battle) && $scene != Scene_Menu
  80.       Graphics.frame_rate = new_fps if Graphics.frame_rate != new_fps
  81.     end
  82.     $game_variables[SET_FPS_VARIABLE] = new_fps
  83.   end

  84. # New object  -  Called by the "update" object.  Used to check the new FPS
  85. #                value and limit it if needed.
  86.   def glitch_test(fps)
  87.     fps = LIMIT_FPS_MAX if fps > LIMIT_FPS_MAX
  88.     fps = LIMIT_FPS_MIN if fps < LIMIT_FPS_MIN
  89.     return fps
  90.   end
  91. end

  92. class Game_System
  93. # Alias method  -  Used to initialize frame rate.
  94.   alias initialize_with_framerate initialize
  95.   def initialize
  96.     $cp_framerate = Game_FrameRate.new
  97.     initialize_with_framerate
  98.   end

  99. # Alias method  -  Used to update the frame rate.
  100.   alias update_with_framerate update
  101.   def update
  102.     update_with_framerate
  103.     $cp_framerate.update
  104.   end
  105. end

  106. class Sprite_Character < Sprite_Base
  107. # Alias method  -  Used to change sprite blending.
  108.   alias update_with_framerate update
  109.   def update
  110.     update_with_framerate
  111.     self.blend_type = Graphics.frame_rate <= SLOMO_BLEND_EFFECT ? 1 : 0
  112.   end
  113. end

  114. class Scene_Map < Scene_Base
  115. # Alias method  -  Used to return the framerate to 60 in battle.
  116.   alias perform_battle_transition_with_framerate perform_battle_transition
  117.   def perform_battle_transition
  118.     Graphics.frame_rate = 60
  119.     perform_battle_transition_with_framerate
  120.   end
  121. end

  122. class Scene_Menu < Scene_Base
  123. # Alias method  -  Used to return the framerate to 60 in the menu.
  124.   alias initialize_with_framerate initialize
  125.   def initialize(menu_index = 0)
  126.     Graphics.frame_rate = 60
  127.     initialize_with_framerate(menu_index)
  128.   end
  129. end
复制代码
http://share.renren.com/share/293782735/15182858551
梦石
0
星屑
9627
在线时间
1287 小时
注册时间
2017-9-27
回帖
148
发表于 2018-10-13 19:38:30 | 显示全部楼层
稍微粗略的看了一下...好像是vx的脚本?应该是不能使用。
应该啦...
回复

使用道具 举报

梦石
0
星屑
19426
在线时间
3082 小时
注册时间
2013-1-11
回帖
1207
发表于 2018-10-13 23:43:20 | 显示全部楼层
1、102-116行替换成下面的
  1. class Scene_Base
  2.   alias update_with_framerate update
  3.   def update
  4.     ($cp_framerate ||= Game_FrameRate.new).update
  5.     update_with_framerate
  6.   end
  7. end
复制代码


2、搜索class Scene_Menu < Scene_Base修改成下面的
  1. class Scene_Menu < Scene_MenuBase
复制代码

点评

jing guo zhe me yi gai guo ran mei you cuo wu le ,qiang lie gan xie  发表于 2018-10-14 05:51

评分

参与人数 1星屑 +10 收起 理由
VIPArcher + 10 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
584
在线时间
448 小时
注册时间
2009-6-8
回帖
55
 楼主| 发表于 2018-10-17 07:17:30 来自手机 | 显示全部楼层
修改了之后没有错误了,但是打开慢镜头之后所有的事件都在显示效果,连门什么的都在闪,自己改了几次都没用,怎么改才能只让主角有BLEND_EFFECT?
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部