This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
A problem I have is sometimes when I remove all units from the map they still somewhat "persist".
No unit actor is visible in the game, but its almost as if a phantom unit is there who can still attack and shoot lasers...
The code I have for removal is this:
void PlayerRemoveUnitsAll(int player){ unitgroup tmpGroup = UnitGroup(null, player, RegionEntireMap(), null, 0); UnitGroupLoopBegin(tmpGroup); while(!UnitGroupLoopDone()){ UnitRemove(UnitGroupLoopCurrent()); UnitGroupLoopStep(); } UnitGroupLoopEnd();}
Then you would call
PlayerRemoveUnitsAll(c_playerAny);
Edit: This seems to be inconsistent. It happens on occasion at random....
A problem I have is sometimes when I remove all units from the map they still somewhat "persist".
No unit actor is visible in the game, but its almost as if a phantom unit is there who can still attack and shoot lasers...
The code I have for removal is this:
void PlayerRemoveUnitsAll(int player){
unitgroup tmpGroup = UnitGroup(null, player, RegionEntireMap(), null, 0);
UnitGroupLoopBegin(tmpGroup);
while(!UnitGroupLoopDone()){
UnitRemove(UnitGroupLoopCurrent());
UnitGroupLoopStep();
}
UnitGroupLoopEnd();
}
Then you would call
PlayerRemoveUnitsAll(c_playerAny);
Edit: This seems to be inconsistent. It happens on occasion at random....