加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
上面那段是主角的坐标引发战斗,下面那段是队友的坐标引发战斗
distance = ($game_player.x - self.x).abs + ($game_player.y - self.y).abs enable = (distance <= @sensor_range) key = [$game_map.map_id, self.id, XAS_BA::SENSOR_SELF_SWITCH] last_enable = $game_self_switches[key] last_enable = false if last_enable == nil if enable != last_enable $game_self_switches[key] = enable $game_map.need_refresh = true end if self.battler != nil for i in $duiwu_jsm duiyoum = $game_map.events.values.select{|ev| ev.event.name == i} for c in duiyoum distance = (c.x - self.x).abs + (c.y - self.y).abs enable = (distance <= @sensor_range) key = [$game_map.map_id, self.id, XAS_BA::SENSOR_SELF_SWITCH] last_enable = $game_self_switches[key] last_enable = false if last_enable == nil if enable != last_enable $game_self_switches[key] = enable $game_map.need_refresh = true end
distance = ($game_player.x - self.x).abs + ($game_player.y - self.y).abs
enable = (distance <= @sensor_range)
key = [$game_map.map_id, self.id, XAS_BA::SENSOR_SELF_SWITCH]
last_enable = $game_self_switches[key]
last_enable = false if last_enable == nil
if enable != last_enable
$game_self_switches[key] = enable
$game_map.need_refresh = true
end
if self.battler != nil
for i in $duiwu_jsm
duiyoum = $game_map.events.values.select{|ev| ev.event.name == i}
for c in duiyoum
distance = (c.x - self.x).abs + (c.y - self.y).abs
enable = (distance <= @sensor_range)
key = [$game_map.map_id, self.id, XAS_BA::SENSOR_SELF_SWITCH]
last_enable = $game_self_switches[key]
last_enable = false if last_enable == nil
if enable != last_enable
$game_self_switches[key] = enable
$game_map.need_refresh = true
end
|