Re: Getting the height of the terrain
It's wierd. It doesn't give me any errors, but it doesn't work either.
Here I'll post the complete code:
Code:
function Update(self)
if self:GetAltitude(0,7) <= 5 then
self.PinStrength = 9999;
end
self.Age = 0;
self.ToSettle = false;
local curdist = 25;
for actor in MovableMan.Actors do
local avgx = actor.Pos.X - self.Pos.X;
local avgy = actor.Pos.Y - self.Pos.Y;
local dist = math.sqrt(avgx ^ 2 + avgy ^ 2);
if dist < curdist then;
self:GibThis();
end
end
end
It simply won't pin.