Re: Help with proximity check on actors
Still doesn't seem to work properly, now he just dies instantly.
Code:
function Update(self)
for actor in MovableMan.Actors do
if SceneMan:ShortestDistance(self.Pos, actor.Pos, false).Magnitude < 10 then
self.Health = 0;
end
end
end
I think I'm going to give up soon, this just doesn't make sense, usually I'm not too bad with Lua.