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

Project1

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

[已经解决] 夜想曲角色攻击范围

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
5 小时
注册时间
2009-8-17
帖子
8
跳转到指定楼层
1
发表于 2010-7-22 21:42:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
#--------------------------------------------------------------------------
  # ● 刷新角色普通攻击行为
  #--------------------------------------------------------------------------
  def update_actor_attk
    # C按下时
    if ((Kboard.trigger?($R_Key_SPACE) or Kboard.trigger?($R_Key_RETURN)) or S[1])and @actor_atktime <= 0
      if @actor.weapon_id.between?(50, 65) # and $data_weapons[@actor.weapon_id].rang >= 1
        new_x = @x + (@d == 6 ? 1 : @d == 4 ? -1 : 0)
        new_y = @y + (@d == 2 ? 1 : @d == 8 ? -1 : 0)
        event = $game_map.events[$game_map.check_event(new_x,new_y)]
        return if !event.nil? and !event.is_enemy?
        rang_atk#(@actor.animation1_id)
        return
      end
      new_x = @x + (@d == 6 ? 1 : @d == 4 ? -1 : 0)
      new_y = @y + (@d == 2 ? 1 : @d == 8 ? -1 : 0)
      event = $game_map.events[$game_map.check_event(new_x,new_y)]
      if !event.nil? and event.maxhp > 0 and @actor_atktime <= 0
        @attev = event
        dagame_acon(event,event_damage(@actor, event),@actor.animation2_id)
      end
    end
  end
如何改为攻击面对的方向的前两格

Lv1.梦旅人

剑仙·影羽

梦石
0
星屑
172
在线时间
224 小时
注册时间
2010-3-20
帖子
1580
2
发表于 2010-7-24 17:58:18 | 只看该作者
原系统是往那个方向?

——至今为止,谁也没能分析出他们为什么会因为说了这些话而死。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

宛若

梦石
0
星屑
1563
在线时间
526 小时
注册时间
2007-8-19
帖子
1493

极短24参与开拓者

3
发表于 2010-7-24 19:09:54 | 只看该作者
       new_x = @x + (@d == 6 ? 1 : @d == 4 ? -1 : 0)
        new_y = @y + (@d == 2 ? 1 : @d == 8 ? -1 : 0)
把这里面的1 -1改为2 -2
[url=http://rpg.blue/thread-219730-1-1.html]http://unhero.sinaapp.com/wi.php[/url]
[color=Red]如你所见这是个死坑,没错这就是打我的脸用的[/color]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
5 小时
注册时间
2009-8-17
帖子
8
4
 楼主| 发表于 2010-7-25 15:52:25 | 只看该作者
回复 逸豫 的帖子
试过,不过变成只能打面前的第二格了……

   
回复 支持 反对

使用道具 举报

Lv3.寻梦者

宛若

梦石
0
星屑
1563
在线时间
526 小时
注册时间
2007-8-19
帖子
1493

极短24参与开拓者

5
发表于 2010-7-25 20:48:51 | 只看该作者
        new_x = @x + (@d == 6 ? 1 : @d == 4 ? -1 : 0)
        new_y = @y + (@d == 2 ? 1 : @d == 8 ? -1 : 0)
        new_x2 = @x + (@d == 6 ? 2 : @d == 4 ? -2 : 0)
        new_y2 = @y + (@d == 2 ? 2 : @d == 8 ? -2 : 0)
        event = $game_map.events[$game_map.check_event(new_x,new_y)]
        event = $game_map.events[$game_map.check_event(new_x2,new_y2)] if event == nil

评分

参与人数 1星屑 +300 收起 理由
「旅」 + 300 认可答案

查看全部评分

[url=http://rpg.blue/thread-219730-1-1.html]http://unhero.sinaapp.com/wi.php[/url]
[color=Red]如你所见这是个死坑,没错这就是打我的脸用的[/color]
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-6-6 14:44

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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