Re: Object group statement?
actor:IsInGroup("XYZ") returns true if it is in group XYZ.
So, if everything in the group is actors, the code would go like so:
Code:
for actor in MovableMan.Actors do
if actor:IsInGroup("XYZ") then
<code>
end
end
Or, if you wanted to cycle through every type of object (including particles and weapons):
Code:
for actor in MovableMan.Actors do
if actor:IsInGroup("XYZ") then
<code>
end
end
for item in MovableMan.Items do
if item:IsInGroup("XYZ") then
<code>
end
end
for particle in MovableMan.Particles do
if particle:IsInGroup("XYZ") then
<code>
end
end
This is of course assuming the code changes according to object type. Otherwise, you'd just declare a function and call it where <code> would normally be.