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

Project1

 找回密码
 注册会员
搜索
查看: 1201|回复: 3
打印 上一主题 下一主题

[已经解决] 默认工程中的全体动画怎么同时的显示动画和伤害。

[复制链接]

Lv2.观梦者

梦石
0
星屑
381
在线时间
238 小时
注册时间
2013-8-20
帖子
496
跳转到指定楼层
1
发表于 2013-11-5 15:58:22 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
这里的动画不是指那些全画面的位置动画
请问要怎么做?而且那个提示文字也是要跟上显示
不定期回来6R玩。
下方广告帖,欢迎点击

Lv2.观梦者

梦石
0
星屑
381
在线时间
238 小时
注册时间
2013-8-20
帖子
496
2
 楼主| 发表于 2013-11-7 20:01:06 | 只看该作者
容我继续求助
回复 支持 反对

使用道具 举报

Lv2.观梦者

会吐槽的画师

梦石
0
星屑
782
在线时间
3431 小时
注册时间
2011-6-10
帖子
6535
3
发表于 2013-11-7 21:03:23 | 只看该作者
本帖最后由 上贺茂润 于 2013-11-7 21:06 编辑

用这个脚本,我注释了:
RUBY 代码复制
  1. #==============================================================================
  2. # 伤害总和显示+连锁comb华丽脚本
  3. # 原作 来自美站
  4. # By Moghunter
  5. # [url]http://www.atelier-rgss.com/[/url]
  6. # ■ Apresenta a quantidade de acertos no alvo e o dano maximo.
  7. # 注释/图块扩张by 上贺茂润
  8. # 本脚本来自66RPG主站
  9. # 调用请保留此信息
  10. #==============================================================================
  11. # ---------------------------------------------------------------------------
  12. # É necessário ter os arquivos imagens na pasta Graphics/Systems.
  13. # Combo_Damage.png
  14. # Combo_Hud.png
  15. # Combo_Number.png
  16. # ---------------------------------------------------------------------------
  17. module MOG
  18.   #Ativar tempo para fazer combo.
  19.   TIME_COUNT = true
  20.   # 多少时间内算连击? 【你填入的数字/60】 秒
  21.   COMBO_TIME = 240
  22.   # Cancelar a contagem de Combo caso o inimigo acertar o herói.
  23.   ENEMY_CANCEL_COMBO = true
  24.   # 以下显示图片位置!
  25.   # Posição geral das imagens. X Y
  26.   COMBO_POSITION = [10,80]
  27.   # Posição do número de HITS. X Y
  28.   HIT_POSITION = [15,23]
  29.   # Posição do número de dano. X Y
  30.   TOTAL_POSITION = [60,-17]
  31. end  
  32. #===============================================================================
  33. # ■ Game_Temp
  34. #===============================================================================
  35. class Game_Temp
  36.    attr_accessor :combo_hit
  37.    attr_accessor :max_damage   
  38.    attr_accessor :combo_time  
  39.   #--------------------------------------------------------------------------
  40.   # ● initialize
  41.   #--------------------------------------------------------------------------   
  42.    alias mog_combo_display_initialize initialize
  43.    def initialize
  44.        @combo_hit = 0
  45.        @max_damage = 0  
  46.        @combo_time = 0   
  47.        mog_combo_display_initialize
  48.    end
  49. end
  50. #===============================================================================
  51. # ■ Game_Battler
  52. #===============================================================================
  53. class Game_Battler
  54.   #--------------------------------------------------------------------------
  55.   # ● execute_damage
  56.   #--------------------------------------------------------------------------     
  57.   alias mog_combo_display_execute_damage execute_damage
  58.   def execute_damage(user)
  59.       mog_combo_display_execute_damage(user)
  60.       if @hp_damage > 0   
  61.           if user.is_a?(Game_Actor)  
  62.              $game_temp.combo_hit += 1
  63.              $game_temp.max_damage += @hp_damage   
  64.              $game_temp.combo_time = MOG::COMBO_TIME
  65.            else
  66.              $game_temp.combo_hit += 1
  67.              $game_temp.max_damage += @hp_damage   
  68.              $game_temp.combo_time = MOG::COMBO_TIME
  69.              $game_temp.combo_time = 0 if MOG::ENEMY_CANCEL_COMBO == true
  70.           end  
  71.       end  
  72.     end
  73. end  
  74. #===============================================================================
  75. # Combo_Sprite_Hud
  76. #===============================================================================
  77. class Combo_Sprite_Hud < Sprite
  78.    attr_accessor :combo_wait
  79.    include MOG
  80. #--------------------------------------------------------------------------
  81. # Initialize
  82. #--------------------------------------------------------------------------
  83.   def initialize
  84.      super  
  85.      @combo_wait = false
  86.      $game_temp.combo_time = 0
  87.      $game_temp.combo_hit = 0
  88.      $game_temp.max_damage = 0     
  89.      @combo_hit_old = 0
  90.      @animation_speed = 0
  91.      @pos_x = COMBO_POSITION[0]
  92.      @pos_x_fix = 0
  93.      @pos_y = COMBO_POSITION[1]
  94.      create_combo_sprite
  95.      create_total_damage_sprite     
  96.      create_hud_sprite     
  97.    end      
  98. #--------------------------------------------------------------------------
  99. # create_hud_sprite   
  100. #--------------------------------------------------------------------------
  101. def create_hud_sprite   
  102.      @hud = Sprite.new
  103.      @hud.bitmap = Cache.system("Combo_HUD")
  104.      @hud.z = 108
  105.      @hud.x = COMBO_POSITION[0]
  106.      @hud.y = COMBO_POSITION[1]
  107.      @hud.opacity = 250
  108.      @hud.visible = false
  109. end     
  110. #--------------------------------------------------------------------------
  111. # create_total_damage_sprite
  112. #--------------------------------------------------------------------------
  113. def create_total_damage_sprite   
  114.      @total_image = Cache.system("Combo_damage")
  115.      @total_bitmap = Bitmap.new(@combo_image.width,@combo_image.height)
  116.      @total = Sprite.new
  117.      @total.bitmap = @total_bitmap
  118.      @total_im_cw = @total_image.width / 10
  119.      @total_im_ch = @total_image.height+100     
  120.      @total_number_text = $game_temp.max_damage.abs.to_s.split(//)
  121.      for r in [email]0..@total_number_text.size[/email] - 1
  122.        @total_number_abs = @total_number_text[r].to_i
  123.        @total_src_rect = Rect.new(@total_im_cw * @total_number_abs, 0, @total_im_cw, @total_im_ch)
  124.        @total_bitmap.blt(40 + ((@total_im_cw - 12) *  r), 0, @total_image, @total_src_rect)        
  125.      end      
  126.      @total.z = 109
  127.      @total_orig_x = COMBO_POSITION[0] + TOTAL_POSITION[0]
  128.      @total_orig_y = COMBO_POSITION[1] + TOTAL_POSITION[1]
  129.      @total.x = @total_orig_x
  130.      @total.y = @total_orig_y
  131.      @total.zoom_x = 1.00
  132.      @total.zoom_y = 1.00
  133.      @total.opacity = 250  
  134.      @total.visible = false
  135. end     
  136. #--------------------------------------------------------------------------
  137. # create_combo_number  
  138. #--------------------------------------------------------------------------
  139. def create_combo_sprite
  140.      @combo_image = Cache.system("Combo_Number")
  141.      @combo_bitmap = Bitmap.new(@combo_image.width,@combo_image.height)
  142.      @combo = Sprite.new
  143.      @combo.bitmap = @combo_bitmap
  144.      @combo_im_cw = @combo_image.width / 10
  145.      @combo_im_ch = @combo_image.height     
  146.      @combo_number_text = $game_temp.combo_hit.abs.to_s.split(//)
  147.      for r in [email]0..@combo_number_text.size[/email] - 1
  148.        @combo_number_abs = @combo_number_text[r].to_i
  149.        @combo_src_rect = Rect.new(@combo_im_cw * @combo_number_abs, 0, @combo_im_cw, @combo_im_ch)
  150.        @combo_bitmap.blt(40 + ((@combo_im_cw - 12) *  r), 0, @combo_image, @combo_src_rect)        
  151.      end      
  152.      @combo.z = 109
  153.      @combo_orig_x = COMBO_POSITION[0] + HIT_POSITION[0]
  154.      @combo_orig_y = COMBO_POSITION[1] + HIT_POSITION[1]
  155.      @pos_x_fix = (@combo_im_cw / 2 * @combo_number_text.size)
  156.      @combo.x = @combo_orig_x - @pos_x_fix     
  157.      @combo.y = @combo_orig_y
  158.      @combo.zoom_x = 1.00
  159.      @combo.zoom_y = 1.00
  160.      @combo.opacity = 250
  161.      @combo.visible = false
  162. end  
  163. #--------------------------------------------------------------------------
  164. # Dispose
  165. #--------------------------------------------------------------------------
  166.    def dispose
  167.        @combo_bitmap.dispose
  168.        @combo.bitmap.dispose
  169.        @combo.dispose
  170.        @hud.bitmap.dispose
  171.        @hud.dispose
  172.        @total_bitmap.dispose
  173.        @total.bitmap.dispose
  174.        @total.dispose
  175.        super
  176.    end
  177. #--------------------------------------------------------------------------
  178. # Refresh
  179. #--------------------------------------------------------------------------
  180.    def refresh
  181.      @combo_hit_old = $game_temp.combo_hit
  182.      @combo.bitmap.clear
  183.      @total.bitmap.clear
  184.      @combo_number_text = $game_temp.combo_hit.abs.to_s.split(//)
  185.      for r in [email]0..@combo_number_text.size[/email] - 1
  186.        @combo_number_abs = @combo_number_text[r].to_i
  187.        @combo_src_rect = Rect.new(@combo_im_cw * @combo_number_abs, 0, @combo_im_cw, @combo_im_ch)
  188.        @combo_bitmap.blt(40 + ((@combo_im_cw - 12) *  r), 0, @combo_image, @combo_src_rect)        
  189.      end            
  190.      @total_number_text = $game_temp.max_damage.abs.to_s.split(//)
  191.      for r in [email]0..@total_number_text.size[/email] - 1
  192.        @total_number_abs = @total_number_text[r].to_i
  193.        @total_src_rect = Rect.new(@total_im_cw * @total_number_abs, 0, @total_im_cw, @total_im_ch)
  194.        @total_bitmap.blt(40 + ((@total_im_cw - 12) *  r), 20, @total_image, @total_src_rect)        
  195.      end
  196.        #Combo Position
  197.        @pos_x_fix = (@combo_im_cw / 2 * @combo_number_text.size)
  198.        @combo.x = @combo_orig_x - @pos_x_fix
  199.        @combo.y = @combo_orig_y
  200.        @combo.zoom_x = 2
  201.        @combo.zoom_y = 2
  202.        @combo.opacity = 70
  203.        @combo.visible = true
  204.        #Total Position      
  205.        @total.x = @total_orig_x + 20
  206.        @total.y = @total_orig_y     
  207.        @total.opacity = 100
  208.        @total.visible = true            
  209.        #Hud Position
  210.        @hud.x = COMBO_POSITION[0]
  211.        @hud.y = COMBO_POSITION[1]
  212.        @hud.opacity = 255
  213.        @hud.visible = true
  214. end   
  215. #--------------------------------------------------------------------------
  216. # Slide Update
  217. #--------------------------------------------------------------------------
  218.   def slide_update
  219.     return if @combo.visible == false
  220.     if $game_temp.combo_time > 0 and @combo_wait == false
  221.        $game_temp.combo_time -= 1 if TIME_COUNT == true
  222.     end
  223.     if $game_temp.combo_time > 0 and $game_temp.combo_hit > 0   
  224.          #Total Damage
  225.          if @total.x > @total_orig_x
  226.             @total.x -= 1
  227.             @total.opacity += 8
  228.          else   
  229.             @total.x = @total_orig_x
  230.             @total.opacity = 255
  231.          end  
  232.          #Combo
  233.          if @combo.zoom_x > 1.00
  234.             @combo.zoom_x -= 0.05
  235.             @combo.zoom_y -= 0.05      
  236.             @combo.opacity += 8
  237.          else
  238.             @combo.zoom_x = 1
  239.             @combo.zoom_y = 1
  240.             @combo.opacity = 255
  241.             @combo.x = @combo_orig_x - @pos_x_fix
  242.             @combo.y = @combo_orig_y
  243.          end           
  244.      elsif $game_temp.combo_time == 0 and @combo.visible == true
  245.            @combo.x -= 5
  246.            @combo.opacity -= 10
  247.            @total.x -= 3
  248.            @total.opacity -= 10
  249.            @hud.x += 5
  250.            @hud.opacity -= 10     
  251.            $game_temp.combo_hit = 0
  252.            @combo_hit_old = $game_temp.combo_hit
  253.            $game_temp.max_damage = 0
  254.            if @combo.opacity <= 0
  255.               @combo.visible = false
  256.               @total.visible = false
  257.               @hud.visible = false
  258.            end  
  259.      end   
  260.   end
  261. #--------------------------------------------------------------------------
  262. # Cancel
  263. #--------------------------------------------------------------------------   
  264.   def cancel
  265.       $game_temp.combo_hit = 0
  266.       $game_temp.max_damage = 0
  267.       $game_temp.combo_time = 0      
  268.       @combo_hit_old = $game_temp.combo_hit
  269.   end  
  270. #--------------------------------------------------------------------------
  271. # Clear
  272. #--------------------------------------------------------------------------     
  273.   def clear
  274.       $game_temp.combo_time = 0
  275.   end      
  276. #--------------------------------------------------------------------------
  277. # Update
  278. #--------------------------------------------------------------------------
  279.   def update
  280.     super
  281.     refresh if $game_temp.combo_hit != @combo_hit_old
  282.     slide_update
  283.   end   
  284. end
  285.  
  286. #===============================================================================
  287. # Scene_Battle
  288. #===============================================================================
  289. class Scene_Battle < Scene_Base
  290.   #--------------------------------------------------------------------------
  291.   # ● start
  292.   #--------------------------------------------------------------------------
  293.   alias mog_combo_start start
  294.   def start
  295.     create_cb_sprite
  296.     mog_combo_start
  297.   end
  298.   #--------------------------------------------------------------------------
  299.   # ● create_cb_sprite
  300.   #--------------------------------------------------------------------------  
  301.   def create_cb_sprite
  302.      @combo_sprite = Combo_Sprite_Hud.new
  303.   end
  304.   #--------------------------------------------------------------------------
  305.   # ● dispose_info_viewport
  306.   #--------------------------------------------------------------------------  
  307.   alias mog_combo_dispose_info_viewport dispose_info_viewport  
  308.   def dispose_info_viewport
  309.      mog_combo_dispose_info_viewport
  310.      @combo_sprite.dispose
  311.   end
  312.   #--------------------------------------------------------------------------
  313.   # ● update_basic
  314.   #--------------------------------------------------------------------------
  315.   alias mog_combo_update_basic update_basic
  316.   def update_basic(main = false)
  317.     mog_combo_update_basic(main)
  318.     @combo_sprite.update      
  319.   end      
  320.   #--------------------------------------------------------------------------
  321.   # ● wait_for_animation
  322.   #--------------------------------------------------------------------------
  323.   alias mog_combo_wait_for_animation wait_for_animation
  324.   def wait_for_animation
  325.     mog_combo_wait_for_animation
  326.     while @spriteset.animation?
  327.           @combo_sprite.combo_wait = true
  328.     end
  329.           @combo_sprite.combo_wait = false
  330.   end   
  331.   #--------------------------------------------------------------------------
  332.   # ● mog_combo_process_victory
  333.   #--------------------------------------------------------------------------   
  334.   alias mog_combo_process_victory process_victory
  335.   def process_victory
  336.       @combo_sprite.clear  
  337.       mog_combo_process_victory
  338.   end   
  339. end  
  340.  
  341. $mog_rgssvx_combo_display = true


显示伤害和连锁.zip (294.03 KB, 下载次数: 64)



另外LZ如果需要更改显示样式的话,就把文件导入PS,然后这样修正就行:

如果LZ不需要文字说明了,就把Window_Message里面的显示内容设置为空

评分

参与人数 1星屑 +100 梦石 +1 收起 理由
铃仙·优昙华院·因幡 + 100 + 1 认可答案

查看全部评分

长名公主玩家群:372588926 攻略娱乐应有尽有
了解更多新RM游戏,游戏制作请加入RPGmaker支援群:113622890
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
381
在线时间
238 小时
注册时间
2013-8-20
帖子
496
4
 楼主| 发表于 2013-11-8 08:13:10 | 只看该作者
上贺茂润 发表于 2013-11-7 21:03
用这个脚本,我注释了:
#=================================================================== ...

多谢你,可是这脚本没有能让动画一同播放的功能啊
不定期回来6R玩。
下方广告帖,欢迎点击
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-6-12 06:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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