public void Activate() { if (!started) { started = true; restartedfrompause = true; groupid = aicallback.CreateGroup("", 0); logfile.WriteLine("ATCUG created group id " + groupid); unitcontroller = UnitController.GetInstance(); unitcontroller.UnitAddedEvent += new UnitController.UnitAddedHandler(UnitAdded); //unitcontroller.UnitRemovedEvent += new UnitController.UnitRemovedHandler( UnitRemoved ); //ScoutUnitDefsById.Clear(); // note, dont just make a new one, because searchpackcoordinator wont get new one unitcontroller.RefreshMyMemory(new UnitController.UnitAddedHandler(UnitAdded)); Recoordinate(); } }