*クマAIホムが敵追撃時に敵に重ならなくする *注意:処理が重くなったり予期せぬ動作をする場合があるかもしれません *USER_AIフォルダにあるAI.luaの修正 -- if (MyDestX ~= x or MyDestY ~= y) then を検索し、その真下に local xx,yy = GetV (V_POSITION,MyID) -- ★自分のホムの位置を取得 を追加して 追加した一行下にある MyDestX, MyDestY = GetV (V_POSITION,MyEnemy); -- 敵の位置をホムの目的位置に設定し の真下に以下を追加 if (xx < x) then -- ★敵の位置に重ならないようにする MyDestXX = MyDestX - 1 if (yy < y) then MyDestYY = MyDestY - 1 elseif (yy > y) then MyDestYY = MyDestY + 1 end elseif (xx > x) then MyDestXX = MyDestX + 1 if (yy < y) then MyDestYY = MyDestY - 1 elseif (yy > y) then MyDestYY = MyDestY + 1 end end -- ★ここまで 最後に上記を追加したすぐ下にある Move (MyID,MyDestX,MyDestY) を Move (MyID,MyDestXX,MyDestYY) に変更 ---- [[加筆、修正一覧へ>http://www13.atwiki.jp/cocktail/pages/648.html]]