根据XP提问区问题( 關於戰鬥動畫)制作 - #==============================================================================# ■ [Ntec]RMVA_Style_Battle_Animation v1.0#------------------------------------------------------------------------------# 仿RMVA战斗动画(全体动画依次播放)#-------------------------------------------------------------------------------# 脚本作者: 各种压力的猫君# RGSS版本: RGSS (Rpg Maker XP)#-------------------------------------------------------------------------------# 更新记录:# ◇2012-01-05 v1.0 by 各种压力的猫君# └初版;#-------------------------------------------------------------------------------# 插入位置:# Scene_Battle 4 之下。# 使用方法:# 插入脚本到正确位置并在通用配置模块中配置相应设定。# 脚本说明:# 无#===============================================================================#-------------------------------------------------------------------------------# ▼ Ntec 通用配置模块#-------------------------------------------------------------------------------module Ntec module RMVA_Style_Battle_Animation # 动画间隔时间(帧) # -1 等待到动画播放结束 WAIT_DURATION = 15 # 伤害文字显示方式 # 0 全体动画播放完毕后一起显示 # 1 随动画播放显示(在等待之前) # 2 随动画播放显示(在等待之后) POP_TEXT_STYLE = 1 # 显示动画时是否隐藏帮助窗口(界面顶端显示技能名的窗口) # 0 一直显示 # 1 第一个伤害文字弹出之前隐藏 # 2 第一个伤害文字弹出之后隐藏 HIDE_HELP_WINDOW = 0"┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓""┃ [Ntec] 自定义内容到此结束,以下内容切勿随意修改 ┃""┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛" # 版本号 VERSION = 1.0 # 错误时操作 ON_ERROR = "exit" # 检测运行环境 if RUBY_VERSION == "1.9.2" print "检测到当前运行环境为RGSS3 (Rpg Maker VX Ace)\n" + "\n本脚本暂不支持此运行环境\n" + "\n按确定键退出" eval Ntec::Para_Expander::ON_ERROR end if defined? $TEST print "检测到当前运行环境为RGSS2 (Rpg Maker VX)\n" + "\n本脚本暂不支持此运行环境\n" + "\n按确定键退出" eval Ntec::Para_Expander::ON_ERROR end endendclass Scene_Battle #-------------------------------------------------------------------------- # ● 刷新画面 #-------------------------------------------------------------------------- def update_for_wait # 基本刷新 Graphics.update Input.update # 系统 (计时器)、刷新画面 $game_system.update $game_screen.update # 计时器为 0 的情况下 if $game_system.timer_working and $game_system.timer == 0 # 中断战斗 $game_temp.battle_abort = true end # 刷新窗口 @help_window.update @party_command_window.update @actor_command_window.update @status_window.update @message_window.update # 刷新活动块 @spriteset.update end #-------------------------------------------------------------------------- # ● abs_wait FROM Ace #-------------------------------------------------------------------------- def abs_wait(duration) duration.times {|i| update_for_wait } end #-------------------------------------------------------------------------- # ● abs_wait_short FROM Ace 改 #-------------------------------------------------------------------------- def abs_wait_short if Ntec::RMVA_Style_Battle_Animation::WAIT_DURATION == -1 abs_wait($data_animations[@animation2_id].frame_max) else abs_wait(Ntec::RMVA_Style_Battle_Animation::WAIT_DURATION) end end #-------------------------------------------------------------------------- # ● 刷新画面 (主回合步骤 4 : 对像方动画) #-------------------------------------------------------------------------- def update_phase4_step4 # 对像方动画 for target in @target_battlers # 播放动画 target.animation_id = @animation2_id target.animation_hit = (target.damage != "Miss") # 隐藏帮助窗口 ntec_hide_help if Ntec::RMVA_Style_Battle_Animation::HIDE_HELP_WINDOW == 1 # 等待前弹出文字 ntec_pop_damage(target) if Ntec::RMVA_Style_Battle_Animation::POP_TEXT_STYLE == 1 # 等待一小段时间 abs_wait_short unless $data_animations[target.animation_id].position == 3 # 等待后弹出文字 ntec_pop_damage(target) if Ntec::RMVA_Style_Battle_Animation::POP_TEXT_STYLE == 2 end # 限制动画长度、最低 8 帧 @wait_count = 8 # 根据伤害文字弹出方式判断下一步骤 if Ntec::RMVA_Style_Battle_Animation::POP_TEXT_STYLE == 0 # 移至步骤 5(播放完成后一次性弹出帮助文字) @phase4_step = 5 else # 移至步骤 6 @phase4_step = 6 end end #-------------------------------------------------------------------------- # ● 弹出伤害文字 #-------------------------------------------------------------------------- def ntec_pop_damage(target) # 弹出伤害文字 if target.damage != nil target.damage_pop = true end # 隐藏帮助窗口 ntec_hide_help if Ntec::RMVA_Style_Battle_Animation::HIDE_HELP_WINDOW == 2 end #-------------------------------------------------------------------------- # ● 隐藏帮助窗口 #-------------------------------------------------------------------------- def ntec_hide_help # 隐藏帮助窗口 @help_window.visible = false endend复制代码
复制代码效果:
(录像软件是Camtasia Studio 7,非常赞,推荐)
(色彩不是录像的错……GIF最大256色你懂的……)
本帖来自P1论坛作者各种压力的猫君,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址: https://rpg.blue/forum.php?mod=viewthread&tid=217860 若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。 |