# ============================================================================= =begin 脚本参考:TheoAllen - 画面震动™的艺术 Lanza Schneider - VA画面震动强化 BY “骨独”1265 =end # ============================================================================= # 设定 : # ============================================================================= $SHAKE_POWER = 1.1#震动强度设置1,不能填0。 $VIEW_SHAKE = 6#手动设置震动类型,不能填0。 $PICFOLLOW_SCREEN_TYPE = true#图片跟随震动设置 $RANDOM_SCREEN_SHAKE_X = 0 $RANDOM_SCREEN_SHAKE_Y = 0 $SHAKE_SCREEN_VALUE = 1#震动强度设置2,不能填0。 class Spriteset_Map #-------------------------------------------------------------------------- # ● 更新地图震动 #-------------------------------------------------------------------------- alias update_viewports_new update_viewports def update_viewports update_viewports_new case $VIEW_SHAKE when 4#纵向震动 @viewport1.oy = 0 @viewport1.ox = $game_map.screen.shake when 5#横向震动 @viewport1.ox = 0 @viewport1.oy = $game_map.screen.shake when 6#随机震动 $RANDOM_SCREEN_SHAKE_X = (rand($SHAKE_POWER).to_f != 0 ? $game_map.screen.shake : - $game_map.screen.shake)#震动值转换为浮点值 $RANDOM_SCREEN_SHAKE_Y = (rand($SHAKE_POWER).to_f != 0 ? $game_map.screen.shake.abs : - $game_map.screen.shake.abs )#取绝对值 @viewport1.ox = $RANDOM_SCREEN_SHAKE_X @viewport1.oy = $RANDOM_SCREEN_SHAKE_Y end end end class Game_Interpreter #-------------------------------------------------------------------------- # ● 画面默认震动效果设置 #-------------------------------------------------------------------------- def command_225 screen.start_shake(@params[0]/2, @params[1]*$SHAKE_SCREEN_VALUE, @params[2]) wait(@params[4]) if @params[6] end end class Sprite_Picture < Sprite #-------------------------------------------------------------------------- # ● 震动图片 #-------------------------------------------------------------------------- def update_origin if @picture.origin == 0 self.ox = 0 self.oy = 0 else self.ox = bitmap.width / 2 self.oy = bitmap.height / 2 end if $PICFOLLOW_SCREEN_TYPE case $VIEW_SHAKE when 4#纵向震动 self.oy += $game_map.screen.shake when 5#横向震动 self.ox += $game_map.screen.shake when 6#随机震动 self.ox += $RANDOM_SCREEN_SHAKE_X self.oy += $RANDOM_SCREEN_SHAKE_Y end end end end
#encoding:utf-8 #============================================================================== # ■ 画面震动加强 V1.1 # 未经授权,禁止私自使用! #------------------------------------------------------------------------------ # V1.0 在原版基础上增加新功能 # V1.1 修复部分BUG # # 使用方法: # screen_shake(power,speed,type,duration,wait_end,follow) # # 参数解释: # power:强度,大于0的整数 # speed:速度,大于0的整数 # type:类型,1:左右震动,2:上下震动,3.随机震动 # duration:持续时间,单位:帧 # wait_end:等待至震动结束,值为true或false # follow:使画面上的图片也跟随震动,值为true或false # # 使用例: # screen_shake(10,5,3,300,true,true) # 强度10,速度5,随机震动,持续时间300秒,等待至震动结束,图片跟随震动 # # by:樱井咲夜 #============================================================================== $SHAKE_TYPE = 1 $FOLLOW_TYPE = false $RANDOM_SHAKE_OX = 0 $RANDOM_SHAKE_OY = 0 class Spriteset_Map #-------------------------------------------------------------------------- # ● 更新地图震动 #-------------------------------------------------------------------------- alias update_viewports_new update_viewports def update_viewports update_viewports_new case $SHAKE_TYPE when 1 @viewport1.ox = $game_map.screen.shake @viewport1.oy = 0 when 2 @viewport1.ox = 0 @viewport1.oy = $game_map.screen.shake when 3 $RANDOM_SHAKE_OX = (rand(2).to_i != 0 ? $game_map.screen.shake : - $game_map.screen.shake) $RANDOM_SHAKE_OY = (rand(2).to_i != 0 ? $game_map.screen.shake.abs : - $game_map.screen.shake.abs ) @viewport1.ox = $RANDOM_SHAKE_OX @viewport1.oy = $RANDOM_SHAKE_OY end end end class Sprite_Picture < Sprite #-------------------------------------------------------------------------- # ● 更新原点 #-------------------------------------------------------------------------- def update_origin if @picture.origin == 0 self.ox = 0 self.oy = 0 else self.ox = bitmap.width / 2 self.oy = bitmap.height / 2 end if $FOLLOW_TYPE case $SHAKE_TYPE when 1 self.ox += $game_map.screen.shake when 2 self.oy += $game_map.screen.shake when 3 self.ox += $RANDOM_SHAKE_OX self.oy += $RANDOM_SHAKE_OY end end end end class Game_Interpreter #-------------------------------------------------------------------------- # ● 画面震动 #-------------------------------------------------------------------------- def command_225 $SHAKE_TYPE = 3 $FOLLOW_TYPE = true screen.start_shake(@params[0]/2, @params[1], @params[2]) wait(@params[2]) if @params[3] end #-------------------------------------------------------------------------- # ● 画面震动(新) #-------------------------------------------------------------------------- def screen_shake(power,speed,type,duration,wait_end,follow) $SHAKE_TYPE = type $FOLLOW_TYPE = follow screen.start_shake(power, speed, duration) wait(duration) if wait_end end end
“骨独”1265 发表于 2021-6-9 13:25
你就是那种属于断章取义的键盘侠吧,需要我跟你比一比键盘么?你玩过我的游戏了么?一昧地喷我你算什么东西 ...
ppspssss 发表于 2021-6-9 14:10
百度搜了下B站, 貌似2013年就有了? https://www.bilibili.com/video/av733930/
case $VIEW_SHAKE when 4#纵向震动 self.oy += $game_map.screen.shake when 5#横向震动 self.ox += $game_map.screen.shake when 6#随机震动 self.ox += $RANDOM_SCREEN_SHAKE_X self.oy += $RANDOM_SCREEN_SHAKE_Y end
case $SHAKE_TYPE when 1 self.ox += $game_map.screen.shake when 2 self.oy += $game_map.screen.shake when 3 self.ox += $RANDOM_SHAKE_OX self.oy += $RANDOM_SHAKE_OY end
alias update_viewports_new update_viewports
alias update_viewports_new update_viewports
ppspssss 发表于 2021-6-9 22:42
我以前也是用其他游戏作品改一改内容就说自己做, 是黑历史了, 不妨给他一个机会改错, 给他一个下台阶, 也 ...
小怪兽奇奇侠 发表于 2021-6-10 08:50
对,一直想不通野生这样子的侵权游戏为什么会受到人们的追捧,给小孩子看的哆啦A梦染上血腥色彩还如此大受 ...
Swanfal 发表于 2021-6-10 01:39
所以为什么不冲野比生化,毕竟既侵权哆啦A梦,又侵权生化危机
真·可乐 发表于 2021-6-9 22:35
私认为骨独的脚本是直接修改的樱井咲夜所写脚本,而并非参考另外俩脚本自行编写。俩脚本一眼看过去就给人一 ...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |