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

Project1

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

[已经过期] 熊式横版战斗攻击移动的问题

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
168 小时
注册时间
2007-7-26
帖子
477
跳转到指定楼层
1
发表于 2015-11-29 16:25:11 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 cmmd1 于 2015-11-29 16:28 编辑

感谢@无忧谷主幻  提议解决两排队伍的问题

下面是我要问的问题

没有跑到中间去释放技能,这个是半距离攻击的。
我替换了“熊式横版战斗”的素材,那个半距离技能攻击的距离是在哪里改啊?我的角色跑了一步就开始释放技能了,没有跑到中间去放,看起来很别扭啊
@弗雷德
Project1.rar (1.78 MB, 下载次数: 40)

点评

SORRY,俺已经不碰RM了,电脑也没装了,so sad……  发表于 2015-11-30 11:36

Lv4.逐梦者

梦石
0
星屑
7559
在线时间
1315 小时
注册时间
2015-8-15
帖子
747
2
发表于 2015-11-30 15:11:13 | 只看该作者
本帖最后由 金芒芒 于 2015-11-30 15:15 编辑

技能动画从做一下你的赵云没有目标的攻击+个人在弄赵云动作图在人上打,在空气里这么打,还有你的图片也要分享一下啊,资源匮乏大家做不出好东西,有什么大家一起研究

ZHAOYUN.png (94.14 KB, 下载次数: 8)

ZHAOYUN.png

点评

你加我啊,不然怎么发素材啊  发表于 2015-11-30 17:27
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
168 小时
注册时间
2007-7-26
帖子
477
3
 楼主| 发表于 2015-11-30 18:17:53 | 只看该作者
本帖最后由 cmmd1 于 2015-11-30 18:21 编辑

RUBY 代码复制
  1. def update_phase4_step3
  2.     ####普通攻击的场合############################################################
  3.     if @active_battler.current_action.basic == 0 and
  4.       @active_battler.current_action.kind == 0
  5.       #开始执行移动
  6.      if not @active_battler.element_rate(UNMOVE)>100# 如果属性“不移动”不大于100
  7.         @active_battler.startactive = "移动"
  8.         @oldxy = [@active_battler.screen_x,@active_battler.screen_y]
  9.         ox,oy = @active_battler.screen_x,@active_battler.screen_y
  10.       if @active_battler.element_rate(HOMOVE)>100# 如果属性“半距离”大于100
  11.         @_move_duration = Move_Duration/2
  12.        while @_move_duration > 0
  13.         Graphics.update
  14.         Input.update
  15.         @spriteset.update
  16.         if @target_battlers[0].is_a?(Game_Actor)
  17.         tag = [@target_battlers[0].screen_x-@target_battlers[0].width-(@target_battlers[0].screen_x-ox).abs/2.abs,@target_battlers[0].screen_y+1]
  18.         else
  19.         tag = [(@target_battlers[0].screen_x+@target_battlers[0].width/1.5)+(@target_battlers[0].screen_x-ox).abs/2,@target_battlers[0].screen_y+2]
  20.         end
  21.         move(@active_battler, tag, ox, oy)
  22.         @_move_duration -= 1
  23.       end
  24.     else
  25.       @_move_duration = Move_Duration
  26.         while @_move_duration > 0
  27.         Graphics.update
  28.         Input.update
  29.         @spriteset.update
  30.         if @target_battlers[0].is_a?(Game_Actor)
  31.         tag = [@target_battlers[0].screen_x-@target_battlers[0].width/2,@target_battlers[0].screen_y+1]
  32.         else
  33.         tag = [@target_battlers[0].screen_x+@target_battlers[0].width/1.5,@target_battlers[0].screen_y+2]
  34.         end
  35.         move(@active_battler, tag, ox, oy)
  36.         @_move_duration -= 1
  37.       end
  38.       end
  39.     end
  40.    ####普通攻击的场合############################################################
  41.     elsif @active_battler.current_action.kind == 1
  42.     ####使用特技的场合############################################################
  43.       if not @skill.element_set.include?(UNMOVE)# 如果技能不包含“不移动属性”
  44.         @active_battler.startactive = "移动"
  45.         @oldxy = [@active_battler.screen_x,@active_battler.screen_y]
  46.         ox,oy = @active_battler.screen_x,@active_battler.screen_y
  47.       if @skill.element_set.include?(HOMOVE)#如果技能不包含“半距离”属性
  48.         @_move_duration = Move_Duration/2
  49.        while @_move_duration > 0
  50.         Graphics.update
  51.         Input.update
  52.         @spriteset.update
  53.         if @target_battlers[0].is_a?(Game_Actor)
  54.         tag = [@target_battlers[0].screen_x-@target_battlers[0].width-(@target_battlers[0].screen_x-ox).abs/2.abs,@target_battlers[0].screen_y+1]
  55.         else
  56.         tag = [(@target_battlers[0].screen_x+@target_battlers[0].width/1.5)+(@target_battlers[0].screen_x-ox).abs/2,@target_battlers[0].screen_y+2]
  57.         end
  58.         move(@active_battler, tag, ox, oy)
  59.         @_move_duration -= 1
  60.       end
  61.     else
  62.       @_move_duration = Move_Duration
  63.         while @_move_duration > 0
  64.         Graphics.update
  65.         Input.update
  66.         @spriteset.update
  67.         if @target_battlers[0].is_a?(Game_Actor)
  68.         tag = [@target_battlers[0].screen_x-@target_battlers[0].width,@target_battlers[0].screen_y+1]
  69.         else
  70.         tag = [@target_battlers[0].screen_x+@target_battlers[0].width/1.5,@target_battlers[0].screen_y+2]
  71.         end
  72.         move(@active_battler, tag, ox, oy)
  73.         @_move_duration -= 1
  74.       end
  75.       end
  76.     end
  77.    #####使用特技的场合##############################################################
  78. end
  79. if @active_battler.startactive != "防御"
  80.     @active_battler.startactive = "待机"
  81.    end
  82.     # 行动方动画 (ID 为 0 的情况下是白色闪烁)
  83.     if @animation1_id == 0
  84.       @active_battler.white_flash = true
  85.     else
  86.       @active_battler.animation_id = @animation1_id
  87.       @active_battler.animation_hit = true
  88.     end
  89.     for target in @target_battlers
  90.       if target.guarding? and target.damage.is_a?(Numeric)
  91.         target.startactive = "防御" if target.damage > 0
  92.         end
  93.       target.animation_id = @animation2_id
  94.       target.animation_hit = (target.damage != "Miss")
  95.     end
  96.     # 移至步骤 4
  97.     @phase4_step = 4
  98.   end
  99.   ##############################################################################
  100.   def update_phase4_step4
  101.    ###########################万兽熊最高########################################
  102.     # 对像方动画
  103.      for target in @target_battlers
  104.        if target.damage != nil
  105.          target.damage_pop = true
  106.        end
  107.      end
  108.     # 限制动画长度、最低 8 帧
  109.   #  @wait_count = 8
  110.   ##############################################################################
  111.     # 移至步骤 5
  112.     @phase4_step = 5
  113.   end
  114. ####################万兽熊最高############################
  115.   def update_phase4_step5
  116.     # 隐藏帮助窗口
  117.     @help_window.visible = false
  118.     if @active_battler.current_action.basic == 0 and
  119.       @active_battler.current_action.kind == 0
  120.    ####普通攻击的场合############################################################   
  121.       #执行返回
  122.     if not @active_battler.element_rate(UNMOVE)>100# 如果属性“不移动”不大于100
  123.       @active_battler.startactive = "返回"
  124.       if @active_battler.element_rate(HOMOVE)>100# 如果属性“半距离”大于100
  125.       @_move_duration = Move_Duration/2
  126.       else
  127.       @_move_duration = Move_Duration   
  128.       end
  129.       ox,oy = @active_battler.screen_x - @active_battler.movex,\
  130.       @active_battler.screen_y - @active_battler.movey
  131.       while @_move_duration > 0
  132.         Graphics.update
  133.         Input.update
  134.         @spriteset.update
  135.         move(@active_battler, @oldxy, ox, oy, true)
  136.         @_move_duration -= 1
  137.       end
  138.     end
  139.    ####普通攻击的场合############################################################
  140.     elsif @active_battler.current_action.kind == 1
  141.       if not @skill.element_set.include?(UNMOVE)#如果技能不包含“不移动”属性
  142.       @active_battler.startactive = "返回"
  143.       if @skill.element_set.include?(HOMOVE)#如果技能包含“半距离”属性
  144.       @_move_duration = Move_Duration/2
  145.       else
  146.       @_move_duration = Move_Duration   
  147.       end
  148.       ox,oy = @active_battler.screen_x - @active_battler.movex,\
  149.       @active_battler.screen_y - @active_battler.movey
  150.       while @_move_duration > 0
  151.         Graphics.update
  152.         Input.update
  153.         @spriteset.update
  154.         move(@active_battler, @oldxy, ox, oy, true)
  155.         @_move_duration -= 1
  156.       end
  157.     end
  158.    ####使用特技的场合############################################################
  159. end
  160. if @active_battler.startactive != "防御"
  161.     @active_battler.startactive = "待机"
  162.    end
  163.     # 刷新状态窗口
  164.     @status_window.refresh
  165.     # 显示伤害
  166.     for target in @target_battlers
  167.       target.startactive = "待机"
  168.       if target.damage != nil
  169.         target.damage_pop = true
  170.       end
  171.     end
  172.     # 移至步骤 6
  173.     @phase4_step = 6
  174.   end
  175.   def update_phase4_step6
  176.     # 清除强制行动对像的战斗者
  177.     $game_temp.forcing_battler = nil
  178.     @active_battler.movex = 0
  179.     @active_battler.movey = 0
  180.     @active_battler.startactive = "待机" if @active_battler.startactive != "死亡"
  181.     # 公共事件 ID 有效的情况下
  182.     if @common_event_id > 0
  183.       # 设置事件
  184.       common_event = $data_common_events[@common_event_id]
  185.       $game_system.battle_interpreter.setup(common_event.list, 0)
  186.     end
  187.     # 移至步骤 1
  188.     @phase4_step = 1
  189.   end
  190. end

点评

大家帮忙看一下吧,和动画啥的没关系,就是脚本这个问题,哪里改移动距离的。  发表于 2015-11-30 20:18
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-23 01:33

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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