加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
这是剽窃后的脚本 游戏链接https://rpg.blue/forum.php?mod=viewthread&tid=485932#lastpost
# ============================================================================= =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
# =============================================================================
=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
原作脚本 游戏链接https://tieba.baidu.com/p/7344386358
#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
#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
抄袭者声称灵感来源
https://rpg.blue/thread-406010-1-1.html
https://github.com/theoallen/RGS ... Free/Screenshake.rb
完全不一致
此人在我吧已有过触犯众怒的抄袭行为并死不悔改,请论坛管理员从重处罚
https://tieba.baidu.com/p/7023150527 |