Re: Number of actors in a radius
Something like
Code:
function Update(self)
self.Noomboomba = 0;
for actor in MovableMan.Actors do
if actor.PresetName == "Coalition Light" and SceneMan:ShortestDistance(self.Pos, actor.Pos, SceneMan.SceneWrapsX).Magnitude < 100 then
self.Noomboomba = self.Noomboomba + 1;
end
end
end
After the 'for actor' block, self.Noomboomba will have the number of Coalition Light units in range, or whatever they're named.