Skip to content

Instantly share code, notes, and snippets.

@bergmark
Created February 1, 2011 14:13
Show Gist options
  • Select an option

  • Save bergmark/805908 to your computer and use it in GitHub Desktop.

Select an option

Save bergmark/805908 to your computer and use it in GitHub Desktop.
static region startRegion = RegionFromId(1);
static region endRegion = RegionFromId(2);
static region allRegion = RegionFromId(3);
void gg_MapInit()
{
unitgroup ug = UnitGroupEmpty();
unit u;
int i;
gg_log("Map Loaded");
gg_createVisibilityRevealer(1, allRegion);
gg_createUnitInRegion(1, "Marine", startRegion);
gg_setPlayerMinerals(1, 1000);
gg_setPlayerVespene(1, 2000);
u = gg_createUnitInRegionAtRandomPoint(1, "Marauder", endRegion);
gg_issueOrder(u, "dance", "replace");
gg_issueOrderToPoint(u, "move", RegionGetCenter(startRegion), "addtoend");
u = gg_createUnitInRegionAtRandomPoint(1, "Sentry", endRegion);
UnitGroupAdd(ug, u);
u = gg_createUnitInRegionAtRandomPoint(1, "Sentry", endRegion);
UnitGroupAdd(ug, u);
i = UnitGroupCount(ug, c_unitCountAlive);
while (i > 0) {
gg_issueOrderToPoint(UnitGroupUnit(ug, i), "move", RegionGetCenter(startRegion), "addtoend");
i = i - 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment