
 Basic Lua Question (total newb question)
Code:
function Create(self)
    local curdist = 100;
    self.parent = nil;
    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
       curdist = dist;
       self.parent = actor;
   end
    end
end
(taken from the Dear Sister weapon)
Does this mean:
"When the Create function is called, take the following actions:" ?