[[http://www.siedler-games.de|{{:sg-link.jpg|}}]] ====IsNear umgebaut==== Habe aus Bedarf die Funktion **IsNear** umgebaut. Dadurch ist es möglich Position oder Entity anzugeben. function IsNear(_entity, _target, _range) return GetDistance(_entity, _target) <= _range end function GetDistance(_a, _b) if type(_a) ~= "table" then _a = GetPosition(_a); end if type(_b) ~= "table" then _b = GetPosition(_b); end return math.sqrt((_a.X - _b.X)^2+(_a.Y - _b.Y)^2) end Als Nebeneffekt ist Dank Nerverminds Anregung die Funktion GetDistance entstanden.