Re: Doesn't seem to be attaching my script
Code:
function Create(self)
self.killdist = 50;
end
function Update(self)
for actor in MovableMan.Actors do
local curdist;
curdist = math.sqrt(math.pow(self.Pos.X - actor.Pos.X,2) + math.pow(self.Pos.Y - actor.Pos.Y,2));
if curdist <= self.killdist and actor:IsInGroup("Parasites") == false then
actor.Health = actor.Health - 2;
end
end
end
The script doesn't do exactly what it's supposed to do yet. I checked if it worked already by putting "self.Health = 0" in create(), and looked to see if the drop ship spat out a crab corpse. It gave me a live one.
EDIT: And yes, the filepath is correct.