您现在看到的是 66RPG.com 的资源列表,若这些对您有帮助,
希望您以充值论坛VIP点数的方式为我们捐款,
您的捐款将用于本站的三台服务器托管费,以及网通100M带宽的租金

66RPG充值页面 66RPG充值页面

最近更新记录

  • 2012-02-14 : 新增两个音乐素材
  • 2012-02-14 : 新增一个游戏资源
  • 2012-02-10 : 新增3个素材资源
  • 2012-02-09 : 新增/更新16个资源

66RPG 站内搜索

精确(推荐) 全文

本站收集内容是为了便于让游戏制作爱好者互相学习与交流,所有内容的版权与著作权均归原作者/公司所有。如进行有可能引起纠纷的使用,建议您先与原作方沟通。
2种敌人战斗新的死法- -|||(
更新:2012-01-27 13:35:53 | 点击量:2104
2种敌人战斗新的死法- -|||(
脚本作者:神思
版本更新:Ver 1.0
适用版本:RPG Maker XP
战斗画面角色崩坏(collapse)的自定义效果

就是类似仙剑那样..死了之后不是红光一闪..而是直接..升天- -`|||||
其实只是重新定义collapse而已..............

module RPG
  class Sprite < ::Sprite   
    def initialize(viewport = nil)
      super(viewport)
      @_whiten_duration = 0
      @_appear_duration = 0
      @_escape_duration = 0
      @_collapse_duration = 0
      @_damage_duration = 0
      @_animation_duration = 0
      @_blink = false
      @coll_time = 0
    end
    def collapse
      @coll.dispose if @coll != nil 
      @coll = Sprite.new
      @coll.bitmap = Bitmap.new("Graphics/Battlers/#{@battler_name}") 
      @coll.ox = self.ox
      @coll.oy = self.oy
      @coll.opacity = 100
      @coll.z = 0
      @coll.blend_type = 1
      @coll.x = self.x
      @coll.y = self.y
      @coll_time = 42
      @_whiten_duration = 0
      @_appear_duration = 0
      @_escape_duration = 0
    end
    def update
      super
      if @_whiten_duration > 0
        @_whiten_duration -= 1
        self.color.alpha = 128 - (16 - @_whiten_duration) * 10
      end
      if @_appear_duration > 0
        @_appear_duration -= 1
        self.opacity = (16 - @_appear_duration) * 16
      end
      if @_escape_duration > 0
        @_escape_duration -= 1
        self.opacity = 256 - (32 - @_escape_duration) * 10
      end
      if @coll_time > 0
        @coll_time -= 1
        @coll.y = self.y - (48 - @coll_time) * 6
        self.opacity = 256 - (48 - @coll_time) * 6
        if @coll_time == 0
          @coll.dispose
        end
      end
      if @_damage_duration > 0
        @_damage_duration -= 1
        case @_damage_duration
        when 38..39
          @_damage_sprite.y -= 2
        when 36..37
          @_damage_sprite.y -= 4
        when 34..35
          @_damage_sprite.y -= 2
        when 28..33
          @_damage_sprite.y -= 4
        end
        @_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
        if @_damage_duration == 0
          dispose_damage
        end
      end
      if @_animation != nil and (Graphics.frame_count % 2 == 0)
        @_animation_duration -= 1
        update_animation
      end
      if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
        update_loop_animation
        @_loop_animation_index += 1
        @_loop_animation_index %= @_loop_animation.frame_max
      end
      if @_blink
        @_blink_count = (@_blink_count + 1) % 32
        if @_blink_count < 16
          alpha = (16 - @_blink_count) * 6
        else
          alpha = (@_blink_count - 16) * 6
        end
        self.color.set(255, 255, 255, alpha)
      end
      @@_animations.clear
    end
  end
end

分成2半

module RPG
  class Sprite < ::Sprite   
    def initialize(viewport = nil)
      super(viewport)
      @_whiten_duration = 0
      @_appear_duration = 0
      @_escape_duration = 0
      @_collapse_duration = 0
      @_damage_duration = 0
      @_animation_duration = 0
      @_blink = false
      @coll_time = 0
    end
    def collapse
      @coll.dispose if @coll != nil 
      @coll = Sprite.new
      @coll.bitmap = Bitmap.new("Graphics/Battlers/#{@battler_name}") 
      @coll.ox = self.ox
      @coll.oy = self.oy
      @coll.opacity = 100
      @coll.z = 0
      w = @coll.bitmap.width
      h = @coll.bitmap.height
      @coll.x = self.x
      @coll.y = self.y + h/2
      @coll.src_rect = Rect.new(0,h/2,w,h)
      @collq.dispose if @collq != nil 
      @collq = Sprite.new
      @collq.bitmap = Bitmap.new("Graphics/Battlers/#{@battler_name}") 
      @collq.ox = self.ox
      @collq.oy = self.oy
      @collq.opacity = 255
      @collq.z = 0
      @collq.x = self.x
      @collq.y = self.y
      @collq.src_rect = Rect.new(0,0,w,h/2)
      @coll_time = 42
      @_whiten_duration = 0
      @_appear_duration = 0
      @_escape_duration = 0
    end
    def update
      super
      if @_whiten_duration > 0
        @_whiten_duration -= 1
        self.color.alpha = 128 - (16 - @_whiten_duration) * 10
      end
      if @_appear_duration > 0
        @_appear_duration -= 1
        self.opacity = (16 - @_appear_duration) * 16
      end
      if @_escape_duration > 0
        @_escape_duration -= 1
        self.opacity = 256 - (32 - @_escape_duration) * 10
      end
      if @coll_time > 0
        self.opacity = 0
        @coll_time -= 1
        @coll.x = self.x + (42 - @coll_time) * 16
        @collq.x = self.x - (42 - @coll_time) * 16
        @coll.opacity = 256 - (42 - @coll_time) * 16
        @collq.opacity = 256 - (42 - @coll_time) * 16
        #@collq.opacity = 256 - (42 - @coll_time) * 16
        if @coll_time == 0
          @coll.dispose
        end
      end
      if @_damage_duration > 0
        @_damage_duration -= 1
        case @_damage_duration
        when 38..39
          @_damage_sprite.y -= 2
        when 36..37
          @_damage_sprite.y -= 4
        when 34..35
          @_damage_sprite.y -= 2
        when 28..33
          @_damage_sprite.y -= 4
        end
        @_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
        if @_damage_duration == 0
          dispose_damage
        end
      end
      if @_animation != nil and (Graphics.frame_count % 2 == 0)
        @_animation_duration -= 1
        update_animation
      end
      if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
        update_loop_animation
        @_loop_animation_index += 1
        @_loop_animation_index %= @_loop_animation.frame_max
      end
      if @_blink
        @_blink_count = (@_blink_count + 1) % 32
        if @_blink_count < 16
          alpha = (16 - @_blink_count) * 6
        else
          alpha = (@_blink_count - 16) * 6
        end
        self.color.set(255, 255, 255, alpha)
      end
      @@_animations.clear
    end
  end
end

搜到一些相关内容,看看有没有有用的:

教程 : rmvx时钟素材 : 《炼金术士梅露露~亚兰德的炼金..教程 : 显示ARPG用的窗口教程 : 新人入门录像1 初识RMXP游戏 : 赠予新手们的修改脚本的教程教程 : 大地图制作教程教程 : KKME整合系统教程 : 2种敌人战斗新的死法- -||..教程 : 人物能力状态图的多边形网状绘制教程 : 美化的动态选项窗口游戏 : 《OZ大乱斗:梦想与传说的延续..教程 : PS去行走图底色教程教程 : 日夜控制系统完美版教程 : 神秘羊皮纸教程 : RM反沉迷系统教程 : 动态选项光标教程 : 用流星当板擦,擦出Title标..教程 : 数据包的制作、加密以及解压运行教程 : 物品技能介绍加强(多行显示)教程 : ikki的敌人等级设定教程教程 : 显示对话人物头像教程 : 截图+档位扩展50+存档提示+..教程 : 使用自带字体[功能完善]教程 : fuki对话框(又名呼出对话框..教程 : RMXP在游戏运行中制作事件教程 : 行走图横版战斗-改进版教程 : 导出工程中全部对话文字教程 : 线索仓库增强版教程 : 更改游戏分辨率,简化版教程 : 给每个角色制作攻击动画(不使用..

没找到你想要的?可以使用搜索功能 ↓

66RPG 站内搜索

精确(推荐) 全文

评论啦