# Add Region To Region
Grammar — Add toAdd|Region to r
Flags —Native
|Action
Adds a region to another region.
# Arguments
region
— Regionregion
— Region To Add
Returns — void
native void RegionAddRegion(region r, region regToAdd);
# Related
Category: Region / Creation
- Convert Circle To Region —
region
— RegionCircle - Convert Rectangle To Region —
region
— RegionRect - Add Circle To Region —
void
— RegionAddCircle - Add Rectangle To Region —
void
— RegionAddRect - Add Region To Region —
void
— RegionAddRegion
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4111
if ((gv_finalPlatform == null)) {
gv_finalPlatform = RegionFromId(58);
RegionAddRegion(gv_finalPlatform, RegionFromId(59));
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:946
}
RegionAddRegion(lv_prisonersRegion, RegionFromId(13));
RegionAddRegion(lv_prisonersRegion, RegionFromId(14));
RegionAddRegion(lv_prisonersRegion, RegionFromId(15));
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:947
RegionAddRegion(lv_prisonersRegion, RegionFromId(13));
RegionAddRegion(lv_prisonersRegion, RegionFromId(14));
RegionAddRegion(lv_prisonersRegion, RegionFromId(15));
auto9CA4F5B1_g = UnitGroup(null, gv_pLAYER_10_PROTOSS_CAPTIVES, lv_prisonersRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:948
RegionAddRegion(lv_prisonersRegion, RegionFromId(13));
RegionAddRegion(lv_prisonersRegion, RegionFromId(14));
RegionAddRegion(lv_prisonersRegion, RegionFromId(15));
auto9CA4F5B1_g = UnitGroup(null, gv_pLAYER_10_PROTOSS_CAPTIVES, lv_prisonersRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto9CA4F5B1_u = UnitGroupCount(auto9CA4F5B1_g, c_unitCountAll);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4111
if ((gv_finalPlatform == null)) {
gv_finalPlatform = RegionFromId(58);
RegionAddRegion(gv_finalPlatform, RegionFromId(59));
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:946
}
RegionAddRegion(lv_prisonersRegion, RegionFromId(13));
RegionAddRegion(lv_prisonersRegion, RegionFromId(14));
RegionAddRegion(lv_prisonersRegion, RegionFromId(15));
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:947
RegionAddRegion(lv_prisonersRegion, RegionFromId(13));
RegionAddRegion(lv_prisonersRegion, RegionFromId(14));
RegionAddRegion(lv_prisonersRegion, RegionFromId(15));
auto9CA4F5B1_g = UnitGroup(null, gv_pLAYER_10_PROTOSS_CAPTIVES, lv_prisonersRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:948
RegionAddRegion(lv_prisonersRegion, RegionFromId(13));
RegionAddRegion(lv_prisonersRegion, RegionFromId(14));
RegionAddRegion(lv_prisonersRegion, RegionFromId(15));
auto9CA4F5B1_g = UnitGroup(null, gv_pLAYER_10_PROTOSS_CAPTIVES, lv_prisonersRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto9CA4F5B1_u = UnitGroupCount(auto9CA4F5B1_g, c_unitCountAll);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:1895
TriggerExecute(gt_AddZergDefenses10Minutes, true, false);
Wait(60.0, c_timeAI);
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(10));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(12));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(15));
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:1896
Wait(60.0, c_timeAI);
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(10));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(12));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(15));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[4], RegionFromId(14));
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:1897
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(10));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(12));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(15));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[4], RegionFromId(14));
Wait(180.0, c_timeAI);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:1898
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(12));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(15));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[4], RegionFromId(14));
Wait(180.0, c_timeAI);
lv_i = 1;
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:1919
Wait(60.0, c_timeAI);
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(11));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(13));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(16));
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:1920
Wait(60.0, c_timeAI);
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(11));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(13));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(16));
gv_gatherPoints[1] = PointFromId(1040);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:1921
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(11));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(13));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(16));
gv_gatherPoints[1] = PointFromId(1040);
gv_gatherPoints[2] = PointFromId(1041);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:5607
Wait(0.1, c_timeGame);
}
RegionAddRegion(RegionFromId(23), RegionFromId(24));
auto8AB4F888_n = lv_increments;
for (auto8AB4F888_i = 1; auto8AB4F888_i <= auto8AB4F888_n; auto8AB4F888_i += 1) {
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:5617
Wait(0.1, c_timeGame);
}
RegionAddRegion(RegionFromId(23), RegionFromId(25));
auto16BABB02_n = lv_increments;
for (auto16BABB02_i = 1; auto16BABB02_i <= auto16BABB02_n; auto16BABB02_i += 1) {
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:5627
Wait(0.1, c_timeGame);
}
RegionAddRegion(RegionFromId(23), RegionFromId(26));
while (true) {
lv_currentUnitGroup = UnitGroup(null, gv_pLAYER_01_USER, RegionFromId(23), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pulnar02.sc2map/MapScript.galaxy:2194
for ( ; ( (autoB37DCC4F_ai >= 0 && lv_i <= autoB37DCC4F_ae) || (autoB37DCC4F_ai < 0 && lv_i >= autoB37DCC4F_ae) ) ; lv_i += autoB37DCC4F_ai ) {
gv_xelNagaGates[0].lv_gateRegion = RegionFromName(("Gate " + IntToString(lv_i)));
RegionAddRegion(RegionFromId(6), gv_xelNagaGates[0].lv_gateRegion);
gv_xelNagaGates[0].lv_gateUnit = UnitGroupUnit(UnitGroup("XelNagaTempleDoor", 0, gv_xelNagaGates[0].lv_gateRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterHidden - 32))), 0), 1);
}
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:1895
TriggerExecute(gt_AddZergDefenses10Minutes, true, false);
Wait(60.0, c_timeAI);
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(10));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(12));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(15));
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:1896
Wait(60.0, c_timeAI);
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(10));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(12));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(15));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[4], RegionFromId(14));
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:1897
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(10));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(12));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(15));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[4], RegionFromId(14));
Wait(180.0, c_timeAI);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:1898
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(12));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(15));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[4], RegionFromId(14));
Wait(180.0, c_timeAI);
lv_i = 1;
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:1919
Wait(60.0, c_timeAI);
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(11));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(13));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(16));
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:1920
Wait(60.0, c_timeAI);
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(11));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(13));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(16));
gv_gatherPoints[1] = PointFromId(1040);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:1921
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[1], RegionFromId(11));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[2], RegionFromId(13));
RegionAddRegion(gv_zergWanderers.lv_wanderRegions[3], RegionFromId(16));
gv_gatherPoints[1] = PointFromId(1040);
gv_gatherPoints[2] = PointFromId(1041);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:5607
Wait(0.1, c_timeGame);
}
RegionAddRegion(RegionFromId(23), RegionFromId(24));
auto8AB4F888_n = lv_increments;
for (auto8AB4F888_i = 1; auto8AB4F888_i <= auto8AB4F888_n; auto8AB4F888_i += 1) {
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:5617
Wait(0.1, c_timeGame);
}
RegionAddRegion(RegionFromId(23), RegionFromId(25));
auto16BABB02_n = lv_increments;
for (auto16BABB02_i = 1; auto16BABB02_i <= auto16BABB02_n; auto16BABB02_i += 1) {
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:5627
Wait(0.1, c_timeGame);
}
RegionAddRegion(RegionFromId(23), RegionFromId(26));
while (true) {
lv_currentUnitGroup = UnitGroup(null, gv_pLAYER_01_USER, RegionFromId(23), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar02.sc2map — MapScript.galaxy:2194
for ( ; ( (autoB37DCC4F_ai >= 0 && lv_i <= autoB37DCC4F_ae) || (autoB37DCC4F_ai < 0 && lv_i >= autoB37DCC4F_ae) ) ; lv_i += autoB37DCC4F_ai ) {
gv_xelNagaGates[0].lv_gateRegion = RegionFromName(("Gate " + IntToString(lv_i)));
RegionAddRegion(RegionFromId(6), gv_xelNagaGates[0].lv_gateRegion);
gv_xelNagaGates[0].lv_gateUnit = UnitGroupUnit(UnitGroup("XelNagaTempleDoor", 0, gv_xelNagaGates[0].lv_gateRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterHidden - 32))), 0), 1);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6655
}
else {
RegionAddRegion(libCOMI_gv_cM_ZeratulProphecyArtifactBadRegion, RegionCircle(UnitGetPosition(auto4FDAC2D8_var), libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogUnit, UnitGetType(auto4FDAC2D8_var), "Radius", UnitGetOwner(auto4FDAC2D8_var))));
}
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:4722
else if (true) {
libCOMU_gv_cT_MutatorSafetyZone = RegionCircle(PlayerStartLocation(1), lv_startinglocationsafetyradius);
RegionAddRegion(libCOMU_gv_cT_MutatorSafetyZone, RegionCircle(PlayerStartLocation(2), lv_startinglocationsafetyradius));
}
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:11140
else {
lv_spawnRegion = RegionCircle(PlayerStartLocation(1), 30.0);
RegionAddRegion(lv_spawnRegion, RegionCircle(PlayerStartLocation(2), 30.0));
}
lv_safetyCount = 1;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:11228
else {
lv_spawnRegion = RegionCircle(PlayerStartLocation(1), 30.0);
RegionAddRegion(lv_spawnRegion, RegionCircle(PlayerStartLocation(2), 30.0));
}
lv_safetyCount = 1;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:5480
// Automatic Variable Declarations
// Implementation
RegionAddRegion(libCOOC_gv_cC_NoSpawnRegion, lp_region);
}