class Game_Player < Game_Character #这里设置从哪个ID开始的事件可以穿透 START_ID = 11 #这里设置到哪个ID的事件可以穿透 END_ID = 14 alias soap_66rpg_passable? passable? def passable?(x, y, d) # 求得新的坐标 new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0) new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0) for e in $game_map.events.values if e.x == new_x and e.y == new_y if e.id <= END_ID and START_ID <= e.id return true end end end soap_66rpg_passable?(x, y, d) end end
class Game_Player < Game_Character
#这里设置从哪个ID开始的事件可以穿透
START_ID = 11
#这里设置到哪个ID的事件可以穿透
END_ID = 14
alias soap_66rpg_passable? passable?
def passable?(x, y, d)
# 求得新的坐标
new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
for e in $game_map.events.values
if e.x == new_x and e.y == new_y
if e.id <= END_ID and START_ID <= e.id
return true
end
end
end
soap_66rpg_passable?(x, y, d)
end
end
插入Main前 |