Game Development Reference
In-Depth Information
local path = Sandbox.FindPath(
sandbox,
"default",
position,
agent:GetPosition());
-- If the agent can path to the enemy, use
this
-- enemy as the best possible enemy.
if (#path ~= 0) then
closestEnemy = agent;
distanceToEnemy = distanceToAgent;
end
end
end
end
userData.enemy = closestEnemy;
return userData.enemy ~= nil;
end
function SoldierEvaluators_HasNoEnemy(userData)
return not SoldierEvaluators_HasEnemy(userData);
end
Search WWH ::




Custom Search