Code:
HandleEvent(KillCity) 'CRA_MilitiaCityDestroyed' pre { unit_t tmpUnit; city_t tmpCity; int_t i; int_t tmpPlayer; if(DisbandCityCheck == 0) { tmpPlayer = player[0]; for(i = GetUnitsAtLocation(city[0].location)-1; i >= 0; i = i - 1) { GetUnitByIndex(tmpPlayer, i, tmpUnit); if (CRA_IsMilitia(tmpUnit.type)) { KillUnit(tmpUnit); } } } else { DisbandCityCheck = 0; } }
Comment