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

Project1

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

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

[复制链接]

Lv2.观梦者

梦石
0
星屑
574
在线时间
448 小时
注册时间
2009-6-8
帖子
62
发表于 2018-10-13 01:13:56 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 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

RUBY 代码复制
  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 - [email protected] (e-mail) or "neonblack23" on skype         #
  17. ###--------------------------------------------------------------------------###
  18.  
  19. ###--------------------------------------------------------------------------###
  20. #      Revision information:                                                   #
  21. #  V1.0 - 10.29.2011                                                           #
  22. #   Wrote and debugged main script                                             #
  23. ###--------------------------------------------------------------------------###
  24.  
  25. ###--------------------------------------------------------------------------###
  26. #      Compatibility:                                                          #
  27. #  Alias       - Game_System: initialize, update                               #
  28. #                Sprite_Character: update                                      #
  29. #                Scene_Map: perform_battle_transition                          #
  30. #                Scene_Menu: initialize                                        #
  31. #  New Classes - Game_FrameRate                                                #
  32. #  New Objects - Game_FrameRate: initialize, update, glitch_test               #
  33. ###--------------------------------------------------------------------------###
  34.  
  35. ###--------------------------------------------------------------------------###
  36. #      Instructions:                                                           #
  37. #  Place this script in the "Materials" section of the scripts above main.     #
  38. #  This script is pretty much plug and play with a few options available to    #
  39. #  change below.  Using the script is as simple as changing a single           #
  40. #  variable.  To enter slo-mo, simply change the pre-defined variable.         #
  41. #  Since changing the framerate affects pretty much everything on screen and   #
  42. #  everything in an event, caution is advised when using this script.          #
  43. ###--------------------------------------------------------------------------###
  44.  
  45. ###--------------------------------------------------------------------------###
  46. #      Config:                                                                 #
  47. #  These are the default values used by several of the functions in the        #
  48. #  script.  You may change these values as you find your game requires in      #
  49. #  order to give the player a better playing experience based on your game.    #
  50. #                                                                              #
  51. # The default variable used for the frame rate.  Changing this variable at     #
  52. # any time in game will result in a modified frame rate.                       #
  53. SET_FPS_VARIABLE = 27 # Default = 27                                           #
  54. #                                                                              #
  55. # The default "slow" value.  While the framerate is this value or below, all   #
  56. # events on screen change to "add" blending mode to make slo-mo mode a little  #
  57. # more fancy.  Set this value to 9 or below to disable it.                     #
  58. SLOMO_BLEND_EFFECT = 30 # Default = 30                                         #
  59. #                                                                              #
  60. # The default min and max values for FPS.  These limit what your min and max   #
  61. # values can be in game to prevent large scale bugs.  Even if you set them     #
  62. # higher or lower, the RGSS2 core engine cannot use frame rates lower than 10  #
  63. # or higher than 120.                                                          #
  64. LIMIT_FPS_MAX = 60 # Default = 60                                              #
  65. LIMIT_FPS_MIN = 30 # Default = 30                                              #
  66. #                                                                              #
  67. ###--------------------------------------------------------------------------###
  68.  
  69.  
  70. ###--------------------------------------------------------------------------###
  71. #  The following lines are the actual core code of the script.  While you are  #
  72. #  certainly invited to look, modifying it may result in undesirable results.  #
  73. #  Modify at your own risk!                                                    #
  74. ###--------------------------------------------------------------------------###
  75.  
  76.  
  77. # New class  -  Controls the framerate in game if it is changed by a controller.
  78. class Game_FrameRate
  79.   def initialize
  80.     # Nothing here!  Is that even allowed?  In any case, this is a placeholder.
  81.   end
  82.  
  83.   def update
  84.     new_fps = $game_variables[SET_FPS_VARIABLE]
  85.     new_fps = 60 if new_fps < 10
  86.     new_fps = glitch_test(new_fps)
  87.     if not $scene.is_a?(Scene_Battle) && $scene != Scene_Menu
  88.       Graphics.frame_rate = new_fps if Graphics.frame_rate != new_fps
  89.     end
  90.     $game_variables[SET_FPS_VARIABLE] = new_fps
  91.   end
  92.  
  93. # New object  -  Called by the "update" object.  Used to check the new FPS
  94. #                value and limit it if needed.
  95.   def glitch_test(fps)
  96.     fps = LIMIT_FPS_MAX if fps > LIMIT_FPS_MAX
  97.     fps = LIMIT_FPS_MIN if fps < LIMIT_FPS_MIN
  98.     return fps
  99.   end
  100. end
  101.  
  102. class Game_System
  103. # Alias method  -  Used to initialize frame rate.
  104.   alias initialize_with_framerate initialize
  105.   def initialize
  106.     $cp_framerate = Game_FrameRate.new
  107.     initialize_with_framerate
  108.   end
  109.  
  110. # Alias method  -  Used to update the frame rate.
  111.   alias update_with_framerate update
  112.   def update
  113.     update_with_framerate
  114.     $cp_framerate.update
  115.   end
  116. end
  117.  
  118. class Sprite_Character < Sprite_Base
  119. # Alias method  -  Used to change sprite blending.
  120.   alias update_with_framerate update
  121.   def update
  122.     update_with_framerate
  123.     self.blend_type = Graphics.frame_rate <= SLOMO_BLEND_EFFECT ? 1 : 0
  124.   end
  125. end
  126.  
  127. class Scene_Map < Scene_Base
  128. # Alias method  -  Used to return the framerate to 60 in battle.
  129.   alias perform_battle_transition_with_framerate perform_battle_transition
  130.   def perform_battle_transition
  131.     Graphics.frame_rate = 60
  132.     perform_battle_transition_with_framerate
  133.   end
  134. end
  135.  
  136. class Scene_Menu < Scene_Base
  137. # Alias method  -  Used to return the framerate to 60 in the menu.
  138.   alias initialize_with_framerate initialize
  139.   def initialize(menu_index = 0)
  140.     Graphics.frame_rate = 60
  141.     initialize_with_framerate(menu_index)
  142.   end
  143. end
http://share.renren.com/share/293782735/15182858551

Lv4.逐梦者

梦石
0
星屑
9310
在线时间
1255 小时
注册时间
2017-9-27
帖子
149
发表于 2018-10-13 19:38:30 | 显示全部楼层
稍微粗略的看了一下...好像是vx的脚本?应该是不能使用。
应该啦...
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
19279
在线时间
3074 小时
注册时间
2013-1-11
帖子
1288
发表于 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 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv2.观梦者

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

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-18 23:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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