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

Project1

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

[已经过期] BOSS死掉的效果怎样在一般敌人身上体现啊?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
66 小时
注册时间
2009-2-13
帖子
382
跳转到指定楼层
1
发表于 2010-11-15 00:29:30 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

x
就是一边颤抖,一边陷下去,不像一般敌人死掉一下子消失了

点评

惭愧,是横板来的...  发表于 2010-11-16 20:47
vx有默认的boss挂掉的效果吗?  发表于 2010-11-15 03:14

Lv1.梦旅人

梦石
0
星屑
180
在线时间
829 小时
注册时间
2010-6-26
帖子
671
2
发表于 2010-11-15 01:02:08 | 只看该作者
  1. #==============================================================================
  2. #    Minto's Monster Collapse VX
  3. #    Version: 1.2
  4. #    Author: Minto & modern algebra (rmrk.net)
  5. #    Date: June 25, 2010
  6. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7. #  Description:
  8. #
  9. #    This is a complete rewrite of Minto's Monster Collapse script in order for
  10. #   it to function optimally in RMVX.
  11. #
  12. #    The script is very simple and allows for three basic functions:
  13. #      1) Can play a specified animation upon the death of a monster
  14. #      2) Can specify a special collapse effect, rather than the default fade.
  15. #      3) Specify the colour each monster changes to, rather than default white
  16. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  17. #  Instructions:
  18. #  
  19. #    Paste this script in its own slot above Main and below Materials in the
  20. #   Script Editor (F11)
  21. #
  22. #    To setup collapse effects, all you need to do is use are the following
  23. #   codes in the notebox of the enemy:
  24. #
  25. #      \COLLAPSE_ANIM[n]
  26. #        n : an integer; the ID of the animation you want played. Defaults to
  27. #           0, which means no animation played.
  28. #   
  29. #      \COLLAPSE_TYPE[n]
  30. #        n : the ID of the collapse effect you want played. These are:
  31. #               0  => Default Collapse Effect
  32. #               1  => Shrink
  33. #               2  => Horizontal Expansion
  34. #               3  => Vertical Expansion
  35. #               4  => Contract and Ascend
  36. #               5  => Rotate
  37. #               6  => Shake and Descend
  38. #               7  => Divides Vertically and Separates Vertically
  39. #               8  => Divides Horizontally and Separates Horizontally
  40. #               9  => Divides Vertically and Separates Horizontally
  41. #               10 => Divides Horizontally and Separates Vertically
  42. #               11 => Wave
  43. #               12 => Blur
  44. #               13 => Rotate Fast & Shrink
  45. #               14 => Eraser
  46. #               15 => Pixel Eraser
  47. #
  48. #      \COLLAPSE_TYPE_RANDOM
  49. #        randomly chooses a collapse type for each instance of the enemy
  50. #
  51. #      \COLLAPSE_COLOR[#hex]
  52. #        can specify in hexadecimal the colour it changes to when collapsing.
  53. #          [#rrggbbaa]
  54. #        Examples: \collapse_color[#FFFFFF] # Black
  55. #                  \collapse_colour[#FF808080] # Default
  56. #
  57. #      \COLLAPSE_BLEND[n]
  58. #        n : the blend type. 0 => Normal; 1 => Addition; 2 => Subtraction
  59. #           The default is 1. You might want to set it to 0 for pixel away or
  60. #           blur effects.
  61. #==============================================================================

  62. #==============================================================================
  63. # ** RPG::Enemy
  64. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  65. #  Summary of Changes:
  66. #    new methods - collapse_animation, collapse_type, collapse_blend, effect_ids
  67. #==============================================================================

  68. class RPG::Enemy
  69.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  70.   # * Collapse Animation
  71.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  72.   def collapse_animation
  73.     @collapse_anim = self.note[/\\COLLAPSE_ANIM\[(\d+)\]/i] != nil ? $1.to_i : 0 if @collapse_anim.nil?
  74.     return @collapse_anim
  75.   end
  76.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  77.   # * Collapse Type
  78.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  79.   def collapse_type
  80.     return $1.to_i if self.note[/\\COLLAPSE_TYPE\[(\d+)\]/i] != nil
  81.     array = self.effect_ids
  82.     return array[rand (array.size)] if self.note[/\\COLLAPSE_TYPE_RANDOM/i] != nil
  83.     return 0
  84.   end
  85.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  86.   # * Collapse Colour
  87.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  88.   def collapse_color
  89.     r, g, b, a = 255, 128, 128, 128
  90.     if self.note[/\\COLLAPSE_COLOU?R\[#([\dABCDEF]+)\]/i] != nil
  91.       r = $1[0, 2].to_i (16) if $1.size >= 2
  92.       g = $1[2, 2].to_i (16) if $1.size >= 4
  93.       b = $1[4, 2].to_i (16) if $1.size >= 6
  94.       a = $1[6, 2].to_i (16) if $1.size >= 8
  95.     end
  96.     return r, g, b, a
  97.   end
  98.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  99.   # * Collapse Blend
  100.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  101.   def collapse_blend
  102.     return $1.to_i % 3 if self.note[/\\COLLAPSE_BLEND\[(\d+)\]/i] != nil
  103.     return 1
  104.   end
  105.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  106.   # * Effect IDs
  107.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  108.   def effect_ids
  109.     effects = []
  110.     for i in 0...16 do effects.push (i) end
  111.     return effects
  112.   end
  113. end

  114. #==============================================================================
  115. # ** Game Enemy
  116. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  117. #  Summary of Changes:
  118. #    new instance variable - collapse_type
  119. #    aliased method - perform_collapse
  120. #==============================================================================

  121. class Game_Enemy
  122.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  123.   # * Public Instance Variable
  124.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  125.   attr_reader   :collapse_type # The collapse type for this enemy
  126.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  127.   # * Perform Collapse
  128.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  129.   alias malg_mino_prfrmclpse_mons_0ki2 perform_collapse
  130.   def perform_collapse (*args)
  131.     # Do not play Sound Effect here unless no animation is specified
  132.     if enemy.collapse_animation > 0 && $game_temp.in_battle && dead?
  133.       @collapse = true
  134.       self.animation_id = enemy.collapse_animation
  135.     else
  136.       # Run Original Method
  137.       malg_mino_prfrmclpse_mons_0ki2 (*args)
  138.     end
  139.     @collapse_type = enemy.collapse_type
  140.   end
  141. end

  142. #==============================================================================
  143. # ** Sprite_Battler
  144. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  145. #  Summary of Changes:
  146. #    aliased methods - update_collapse, x=, y=
  147. #    new method - execute_special_collapse, create_dup_sprite
  148. #==============================================================================

  149. class Sprite_Battler
  150.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  151.   # * Update Collapse
  152.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  153.   alias malg_mint_moncollapse_upd_0kh2 update_collapse
  154.   def update_collapse (*args)
  155.     if @battler.actor?
  156.       malg_mint_moncollapse_upd_0kh2 (*args) # Run Original Method
  157.       return
  158.     end
  159.     # If animation, hold off on executing collapse
  160.     if self.animation?
  161.       # Restore lost time
  162.       @effect_duration += 1
  163.       return
  164.     end
  165.     execute_special_collapse (@battler.collapse_type)
  166.     malg_mint_moncollapse_upd_0kh2 (*args) # Run Original Method
  167.     self.color.set (*@battler.enemy.collapse_color)
  168.     self.blend_type = @battler.enemy.collapse_blend
  169.     # Update Duplicate Sprite Opacity
  170.     @dup_sprite.opacity = self.opacity if @dup_sprite != nil
  171.     # If Ending the effect
  172.     if @effect_duration == 0
  173.       # Restore Zoom
  174.       self.zoom_x = 1
  175.       self.zoom_y = 1
  176.       # Free @dup_sprite (not dispose because of Cache)
  177.       @dup_sprite = nil
  178.     elsif @effect_duration == 47 && @battler.enemy.collapse_animation > 0
  179.       # Play Collapse SE once animation has finished.
  180.       Sound.play_enemy_collapse
  181.     end
  182.   end
  183.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  184.   # * Set X
  185.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  186.   alias mal_minto_setx_collapse_0kh3 x=
  187.   def x= (n, *args)
  188.     # Override general x setting when collapsing
  189.     return if @effect_type == COLLAPSE && n == @battler.screen_x
  190.     mal_minto_setx_collapse_0kh3 (n, *args)
  191.   end
  192.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  193.   # * Set Y
  194.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  195.   alias algbmod_ntomi_yset_cllpse_9gb2 y=
  196.   def y= (n, *args)
  197.     # Override general x setting when collapsing
  198.     return if @effect_type == COLLAPSE && n == @battler.screen_y
  199.     algbmod_ntomi_yset_cllpse_9gb2 (n, *args)
  200.   end
  201.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  202.   # * Create Duplicate Sprite
  203.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  204.   def create_dup_sprite (split_type = 0)
  205.     # Create new sprite of the same class and set components
  206.     @dup_sprite = self.class.new (self.viewport, @battler)
  207.     @dup_sprite.x, @dup_sprite.y = self.x, self.y
  208.     @dup_sprite.blend_type = 1
  209.     @dup_sprite.color.set(255, 128, 128, 128)
  210.     @dup_sprite.update
  211.     if split_type == 0 # Vertical Split
  212.       @dup_sprite.src_rect.width = @dup_sprite.ox
  213.       self.src_rect.x = self.ox
  214.       self.x += self.ox
  215.     elsif split_type == 1 # Horizontal Split
  216.       @dup_sprite.src_rect.height = @dup_sprite.oy / 2
  217.       self.src_rect.y = self.oy / 2
  218.       self.y += self.oy / 2
  219.     end
  220.   end
  221.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  222.   # * Execute Special Collapse
  223.   #    collapse_type (type of collapse)
  224.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  225.   def execute_special_collapse (collapse_type)
  226.     case collapse_type
  227.     when 1 # Shrink
  228.       self.zoom_x -= 0.02
  229.       self.zoom_y -= 0.02
  230.       self.y -= (0.01*self.height)
  231.     when 2 # Horizontal Expansion
  232.       self.zoom_x += 0.05
  233.     when 3 # Vertical Expansion
  234.       self.zoom_y += 0.05
  235.       self.zoom_x -= 0.02
  236.     when 4 # Spring Ascent
  237.       if @effect_duration >= 24 then
  238.         self.zoom_y = [self.zoom_y - 0.02, 0].max
  239.         self.zoom_x = [self.zoom_x + 0.01, 1.24].min
  240.       else
  241.         self.zoom_x -= 0.115
  242.         self.zoom_y += 0.6
  243.       end
  244.     when 5 # Rotate
  245.       self.zoom_x -= 0.03
  246.       self.zoom_y += 0.05
  247.       self.angle += 7.5
  248.     when 6 # Shake Descent
  249.       if @effect_duration >= 44
  250.         self.ox -= 1
  251.       else
  252.         self.ox += ((@effect_duration / 4) % 2) == 0 ? 2 : -2
  253.       end
  254.       self.src_rect.y -= self.bitmap.rect.height / 48
  255.     when 7 # Vertical Division; Vertical Movement
  256.       create_dup_sprite (0) if @effect_duration == 47 # Split Vertically
  257.       self.y += [self.oy / 96, 1].max
  258.       @dup_sprite.y -= [@dup_sprite.oy / 96, 1].max
  259.     when 8 # Horizontal Division; Horizontal Movement
  260.       create_dup_sprite (1) if @effect_duration == 47 # Split Horizontally
  261.       self.x += [self.ox / 48, 1].max
  262.       @dup_sprite.x -= [@dup_sprite.ox / 48, 1].max
  263.     when 9 # Vertical Division; Horizontal Movement
  264.       create_dup_sprite (0) if @effect_duration == 47 # Split Vertically
  265.       self.x += [self.ox / 48, 1].max
  266.       @dup_sprite.x -= [@dup_sprite.ox / 48, 1].max
  267.     when 10 # Horizontal Division; Vertical Movement
  268.       create_dup_sprite (1) if @effect_duration == 47 # Split Horizontally
  269.       self.y += [self.oy / 96, 1].max
  270.       @dup_sprite.y -= [@dup_sprite.oy / 96, 1].max
  271.     when 11 # Wave
  272.       self.wave_amp += 1
  273.     when 12 # Blur
  274.       self.bitmap = self.bitmap.dup if @effect_duration == 47
  275.       self.bitmap.blur if @effect_duration % 4 == 0
  276.     when 13 # Fast Rotate and Shrink
  277.       self.angle += 48 - @effect_duration
  278.       execute_special_collapse (1)
  279.     when 14 # Eraser
  280.       self.bush_opacity = 0
  281.       self.bush_depth += (self.height / 48.0).ceil
  282.     when 15 # Pixel Eraser
  283.       if @effect_duration == 47
  284.         self.bitmap = self.bitmap.dup
  285.         @pixels_to_erase = []
  286.         for i in 0...self.bitmap.width
  287.           for j in 0...self.bitmap.height
  288.             @pixels_to_erase.push ([i, j])
  289.           end
  290.         end
  291.         @pixel_erase_rate = @pixels_to_erase.size / 48
  292.       end
  293.       erase_color = Color.new (255, 255, 255, 0)
  294.       @pixel_erase_rate.times do
  295.         x, y = @pixels_to_erase.delete_at (rand (@pixels_to_erase.size))
  296.         self.bitmap.set_pixel (x, y, erase_color)
  297.       end
  298.     end
  299.   end
  300. end
复制代码

点评

这可是英文啊……你查牛津去吧……=.= 把最上面有#的部分看一看就好了…… \COLLAPSE_ANIM[n]、\COLLAPSE_TYPE[n]知道放在哪里且懂得一个个数字试下去就行了   发表于 2010-11-16 21:24
能否解说一下怎么用?  发表于 2010-11-16 20:40
新手们!不要被看扁了!我们也会用论坛搜索,我们也会自己找脚本,我们也会自己点击关闭按钮旁边的小问号!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-26 02:13

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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