From e0de900e5d0df78f3d3f7f6f0a1c2a53a848630a Mon Sep 17 00:00:00 2001 From: Anumania <50345157+Anumania@users.noreply.github.com> Date: Tue, 23 Aug 2022 07:54:54 -0700 Subject: [PATCH] FIXED IT --- eastern flames/scripts/c_doenemyai/c_doenemyai.gml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eastern flames/scripts/c_doenemyai/c_doenemyai.gml b/eastern flames/scripts/c_doenemyai/c_doenemyai.gml index cc9a022..207f47a 100644 --- a/eastern flames/scripts/c_doenemyai/c_doenemyai.gml +++ b/eastern flames/scripts/c_doenemyai/c_doenemyai.gml @@ -1,7 +1,7 @@ function c_doenemyai(target) { switch target.data.aitype { case AI.AFK: - var dude = c_findnearestunit(ARMY.US); + var dude = c_findnearestunit(target.pos.x,target.pos.y,ARMY.US); var dist = c_tiledist(target.pos.x, target.pos.y, dude.pos.x, dude.pos.y); if dist.x+dist.y <= target.data.rng.val { log("started combat") @@ -12,7 +12,7 @@ function c_doenemyai(target) { target.waiting = true; break; case AI.KILLER: - var dude = c_findnearestunit(ARMY.US); + var dude = c_findnearestunit(target.pos.x,target.pos.y,ARMY.US); repeat(target.data.mov.val) { var guy = c_gettile(target.pos.x, target.pos.y); if target.pos.x < dude.pos.x { @@ -41,7 +41,7 @@ function c_doenemyai(target) { target.waiting = true; break; case AI.WAITER: - var dude = c_findnearestunit(ARMY.US); + var dude = c_findnearestunit(target.pos.x,target.pos.y,ARMY.US); var dist = c_tiledist(target.pos.x, target.pos.y, dude.pos.x, dude.pos.y); if dist.x+dist.y > target.data.mov.val + target.data.rng.val { target.waiting = true;