Destroy Placeables in all Areas by Tag
IronActual
Member Posts: 24
Is there a way to destroy all placeables with the same tag in every area at the same time?
I tried using this, but it's only checking the first area. I didn't see any "GetFirstObjectInModule" options...
I tried using this, but it's only checking the first area. I didn't see any "GetFirstObjectInModule" options...
void main()
{
object oTarget = GetModule();
object oObject = GetFirstObjectInArea(oTarget);
while (oObject != OBJECT_INVALID)
{
if (GetTag(oObject)=="placeable_tag")
DestroyObject(oObject);
oObject = GetNextObjectInArea(oTarget);
}
}
0
Comments
void main() { int nth = 0; object oObject = GetObjectByTag("placeable_tag", nth); while (oObject != OBJECT_INVALID) { DestroyObject(oObject); oObject = GetObjectByTag("placeable_tag", ++nth); } }