# Distance Between Points
Grammar — Distance between p1|Point and p2|Point
Flags —Native
|Function
Returns the distance between two points as a real value.
# Arguments
point
— Point 1point
— Point 2
Returns — fixed
native fixed DistanceBetweenPoints(point p1, point p2);
# Related
Category: Point / Measurements
- X Of Point —
fixed
— PointGetX - Y Of Point —
fixed
— PointGetY - Facing Angle Of Point —
fixed
— PointGetFacing - Height Of Point —
fixed
— PointGetHeight - Angle Between Points —
fixed
— AngleBetweenPoints - Distance Between Points —
fixed
— DistanceBetweenPoints - Distance Squared Between Points —
fixed
— DistanceSquaredBetweenPoints - Point Is In Region —
bool
— RegionContainsPoint
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1675
while ((lv_pointValid == false)) {
lv_target = PointWithOffset(lp_center, RandomFixed(-4.0, 4.0), RandomFixed(-1.5, 1.5));
if ((DistanceBetweenPoints(UnitGetPosition(lp_scienceVessel), lv_target) > 1.5)) {
lv_pointValid = true;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1797
// Implementation
lv_initialOffsetPoint = PointWithOffset(gv_terraTronPosition, lp_xOffset, lp_yOffset);
lv_distanceBetweenPoints = DistanceBetweenPoints(gv_terraTronPosition, lv_initialOffsetPoint);
lv_angleBetweenPoints = AngleBetweenPoints(gv_terraTronPosition, lv_initialOffsetPoint);
lv_scaledDistance = (lv_distanceBetweenPoints * gv_terraTronScale);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:2408
lv_k = 1;
for ( ; ( (auto39ACB433_ai >= 0 && lv_k <= auto39ACB433_ae) || (auto39ACB433_ai <= 0 && lv_k >= auto39ACB433_ae) ) ; lv_k += auto39ACB433_ai ) {
lv_distance = DistanceBetweenPoints(lp_positionOfViking, gv_presetSawTargets[lv_i][lv_k]);
if ((lv_distance < lv_bestDistance)) {
lv_bestDistance = lv_distance;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:6852
lv_center = Point(lv_waveInfo.lv_patternParam3, lv_waveInfo.lv_patternParam4);
lv_center = gf_ConvertShooterCoordToMapCoord(lv_center);
lv_radius = DistanceBetweenPoints(lv_center, lv_posTurn);
lv_angleStart = AngleBetweenPoints(lv_center, lv_posTurn);
lv_angleInterval = lv_waveInfo.lv_patternParam6;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:6876
}
lv_posCurrent = UnitGetPosition(lv_plane);
if ((DistanceBetweenPoints(lv_posCurrent, lv_posTurn) < 1.0)) {
break;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:7034
lv_y = (lv_yCoe * Sin(((lv_xCoe * lv_x) - lv_trigAngleStart)));
lv_alpha = AngleBetweenPoints(Point(0.0, 0.0), Point(lv_x, lv_y));
lv_distance = DistanceBetweenPoints(Point(0.0, 0.0), Point(lv_x, lv_y));
lv_posTarget = Point(((lv_distance * Cos((lv_alpha + lv_angle))) + PointGetX(lv_posSpawn)), ((lv_distance * Sin((lv_alpha + lv_angle))) + PointGetY(lv_posSpawn)));
libNtve_gf_MakeUnitFacePoint(lv_plane, lv_posTarget, 0.0625);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:2498
lv_customIntValueOfUnit = FixedToInt(UnitGetCustomValue(lv_pickedUnit, 0));
if ((lv_customIntValueOfUnit > 0) && (lv_customIntValueOfUnit < 100)) {
if ((DistanceBetweenPoints(UnitGetPosition(lv_pickedUnit), gv_escortRouteRallyPoints[lv_customIntValueOfUnit]) <= 1.5)) {
UnitIssueOrder(lv_pickedUnit, OrderTargetingPoint(AbilityCommand("move", 0), gv_escortRouteRallyPoints[(lv_customIntValueOfUnit - 1)]), c_orderQueueReplace);
UnitSetCustomValue(lv_pickedUnit, 0, IntToFixed((lv_customIntValueOfUnit - 1)));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:4099
auto6563E3CC_var = UnitGroupUnitFromEnd(auto6563E3CC_g, auto6563E3CC_u);
if (auto6563E3CC_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(auto6563E3CC_var), UnitGetPosition(gv_briefingZergling)) <= 7.0)) {
UnitBehaviorAdd(auto6563E3CC_var, "Run", auto6563E3CC_var, 1);
UnitIssueOrder(auto6563E3CC_var, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(63)), c_orderQueueReplace);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:4110
auto2D2D84D2_var = UnitGroupUnitFromEnd(auto2D2D84D2_g, auto2D2D84D2_u);
if (auto2D2D84D2_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(auto2D2D84D2_var), UnitGetPosition(gv_briefingZergling)) <= 6.0)) {
UnitBehaviorAdd(auto2D2D84D2_var, "Run", auto2D2D84D2_var, 1);
UnitIssueOrder(auto2D2D84D2_var, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(63)), c_orderQueueReplace);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:4148
autoC6F8DF42_var = UnitGroupUnitFromEnd(autoC6F8DF42_g, autoC6F8DF42_u);
if (autoC6F8DF42_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(autoC6F8DF42_var), UnitGetPosition(UnitFromId(491))) <= 5.0)) {
UnitBehaviorRemove(autoC6F8DF42_var, "Run", 1);
UnitIssueOrder(autoC6F8DF42_var, Order(AbilityCommand("MorphToInfestedCivilian", 0)), c_orderQueueReplace);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:4160
autoE9C294DC_var = UnitGroupUnitFromEnd(autoE9C294DC_g, autoE9C294DC_u);
if (autoE9C294DC_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(autoE9C294DC_var), UnitGetPosition(UnitFromId(491))) <= 5.0)) {
UnitBehaviorRemove(autoE9C294DC_var, "Run", 1);
UnitIssueOrder(autoE9C294DC_var, Order(AbilityCommand("MorphToInfestedCivilian", 0)), c_orderQueueReplace);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:378
for ( ; ( (auto9E7AD11F_ai >= 0 && lv_i <= auto9E7AD11F_ae) || (auto9E7AD11F_ai < 0 && lv_i >= auto9E7AD11F_ae) ) ; lv_i += auto9E7AD11F_ai ) {
lv_distanceRemaining = lv_seperationDistance;
if ((lv_seperationDistance <= DistanceBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]))) {
lv_currentPoint = PointWithOffsetPolar(lv_currentPoint, lv_seperationDistance, AngleBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]));
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:383
else {
while (true) {
lv_distanceRemaining = (lv_distanceRemaining - DistanceBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]));
lv_currentTarget -= 1;
if ((lv_currentTarget < 1)) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:389
}
if ((lv_distanceRemaining <= DistanceBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]))) {
lv_currentPoint = PointWithOffsetPolar(gv_trainPath[lv_currentTarget], lv_distanceRemaining, AngleBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]));
break;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:576
for ( ; ( (auto46B67D1A_ai >= 0 && lv_i <= auto46B67D1A_ae) || (auto46B67D1A_ai < 0 && lv_i >= auto46B67D1A_ae) ) ; lv_i += auto46B67D1A_ai ) {
lv_distanceRemaining = lv_seperationDistance;
if ((lv_seperationDistance <= DistanceBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]))) {
lv_currentPoint = PointWithOffsetPolar(lv_currentPoint, lv_seperationDistance, AngleBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]));
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:581
else {
while (true) {
lv_distanceRemaining = (lv_distanceRemaining - DistanceBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]));
lv_currentTarget -= 1;
if ((lv_currentTarget == 1)) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:587
}
if ((lv_distanceRemaining <= DistanceBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]))) {
lv_currentPoint = PointWithOffsetPolar(gv_trainPath[lv_currentTarget], lv_distanceRemaining, AngleBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]));
break;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:3369
lv_i = gv_bottomStart;
for ( ; ( (auto65AE96E0_ai >= 0 && lv_i <= auto65AE96E0_ae) || (auto65AE96E0_ai < 0 && lv_i >= auto65AE96E0_ae) ) ; lv_i += auto65AE96E0_ai ) {
if ((DistanceBetweenPoints(gv_trainPath[lv_currentPingPoint], gv_trainPath[lv_i]) > 4.0)) {
lv_currentPingPoint = lv_i;
VisExploreArea(gv_pLAYER_01_USER, RegionCircle(gv_trainPath[lv_currentPingPoint], 12.0), true, false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:3383
lv_i = gv_bottomStart;
for ( ; ( (autoF8BC703D_ai >= 0 && lv_i <= autoF8BC703D_ae) || (autoF8BC703D_ai < 0 && lv_i >= autoF8BC703D_ae) ) ; lv_i += autoF8BC703D_ai ) {
if ((DistanceBetweenPoints(gv_trainPath[lv_currentPingPoint], gv_trainPath[lv_i]) > 4.0)) {
lv_currentPingPoint = lv_i;
VisExploreArea(gv_pLAYER_01_USER, RegionCircle(gv_trainPath[lv_currentPingPoint], 12.0), true, false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:3425
lv_i = gv_midStart;
for ( ; ( (auto76C315BA_ai >= 0 && lv_i <= auto76C315BA_ae) || (auto76C315BA_ai < 0 && lv_i >= auto76C315BA_ae) ) ; lv_i += auto76C315BA_ai ) {
if ((DistanceBetweenPoints(gv_trainPath[lv_currentPingPoint], gv_trainPath[lv_i]) > 4.0)) {
lv_currentPingPoint = lv_i;
VisExploreArea(gv_pLAYER_01_USER, RegionCircle(gv_trainPath[lv_currentPingPoint], 12.0), true, false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:3439
lv_i = gv_midStart;
for ( ; ( (auto550579DF_ai >= 0 && lv_i <= auto550579DF_ae) || (auto550579DF_ai < 0 && lv_i >= auto550579DF_ae) ) ; lv_i += auto550579DF_ai ) {
if ((DistanceBetweenPoints(gv_trainPath[lv_currentPingPoint], gv_trainPath[lv_i]) > 4.0)) {
lv_currentPingPoint = lv_i;
PingCreate(PlayerGroupAll(), "PingArrow", gv_trainPath[lv_currentPingPoint], ColorWithAlpha(100.00, 0.00, 0.00, 0.00), 6.0);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:3712
lv_y2 = PointGetY(lp_source);
lv_sourceAfterScaled = Point((lv_x1 + ((lv_x2 - lv_x1) * lp_xRatio)), (lv_y1 + ((lv_y2 - lv_y1) * lp_yRatio)));
lv_dis = DistanceBetweenPoints(lp_sourceCenter, lv_sourceAfterScaled);
lv_angel = AngleBetweenPoints(lp_sourceCenter, lv_sourceAfterScaled);
lv_angel += lp_rotate;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh01.sc2map/MapScript.galaxy:2161
lv_coCe = UnitLastCreated();
UnitIssueOrder(lv_coCe, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(863)), c_orderQueueReplace);
Wait(((DistanceBetweenPoints(PointFromId(862), PointFromId(863)) / UnitGetPropertyFixed(lv_coCe, c_unitPropMovementSpeed, c_unitPropCurrent)) + 0.0), c_timeGame);
if ((UnitIsAlive(lv_coCe) == true)) {
UIAlertUnit("Trigger", gv_p01_USER, StringExternal("Param/Value/19BDCD39"), null, lv_coCe);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:494
auto96AA0583_var = UnitGroupUnitFromEnd(auto96AA0583_g, auto96AA0583_u);
if (auto96AA0583_var == null) { break; }
lv_checkDistance = DistanceBetweenPoints(UnitGetPosition(auto96AA0583_var), PointFromId(13));
if ((lv_closestNodeMinDistance == 0.0)) {
lv_closestNodeMinDistance = lv_checkDistance;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:530
auto7CD40DCB_var = UnitGroupUnitFromEnd(auto7CD40DCB_g, auto7CD40DCB_u);
if (auto7CD40DCB_var == null) { break; }
lv_checkDistance = DistanceBetweenPoints(UnitGetPosition(auto7CD40DCB_var), PointFromId(13));
if ((lv_closestNodeMinDistance == 0.0)) {
lv_closestNodeMinDistance = lv_checkDistance;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:575
}
lv_probe01 = UnitGroupRandomUnit(UnitGroup("Probe", c_playerAny, RegionFromId(36), UnitFilter(0, 0, 0, 0), 0), c_unitCountAlive);
lv_probe01DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe01), UnitGetPosition(lv_canisterHarvestTarget));
lv_probe02 = UnitGroupRandomUnit(UnitGroup("Probe", c_playerAny, RegionFromId(38), UnitFilter(0, 0, 0, 0), 0), c_unitCountAlive);
lv_probe02DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe02), UnitGetPosition(lv_canisterHarvestTarget));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:577
lv_probe01DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe01), UnitGetPosition(lv_canisterHarvestTarget));
lv_probe02 = UnitGroupRandomUnit(UnitGroup("Probe", c_playerAny, RegionFromId(38), UnitFilter(0, 0, 0, 0), 0), c_unitCountAlive);
lv_probe02DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe02), UnitGetPosition(lv_canisterHarvestTarget));
if ((lv_probe01DistanceToCanister <= lv_probe02DistanceToCanister)) {
return lv_probe01;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:480
// Automatic Variable Declarations
// Implementation
if ((UnitGetPropertyFixed(gv_tosh, c_unitPropLifePercent, c_unitPropCurrent) < 100.0) && (DistanceBetweenPoints(UnitGetPosition(gv_tosh), UnitGetPosition(lp_medic)) <= 6.0)) {
libNtve_gf_AICast(lp_medic, OrderTargetingUnit(AbilityCommand("heal", 0), gv_tosh));
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:770
if (autoA878FA45_var == null) { break; }
UnitGroupAdd(gv_cellBlockAJerksGroup, autoA878FA45_var);
UnitSetCustomValue(autoA878FA45_var, 0, DistanceBetweenPoints(UnitGetPosition(autoA878FA45_var), PointFromId(1140)));
UnitSetCustomValue(autoA878FA45_var, 1, AngleBetweenPoints(PointFromId(1140), UnitGetPosition(autoA878FA45_var)));
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:398
// Automatic Variable Declarations
// Implementation
if ((UnitGetOwner(lp_unit) != gv_pLAYER01_USER) && (DistanceBetweenPoints(UnitGetPosition(lp_unit), lp_home) > lp_distance)) {
UnitIssueOrder(lp_unit, OrderTargetingPoint(AbilityCommand("move", 0), lp_home), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:1004
gv_novaNukeCount -= 1;
if ((DistanceBetweenPoints(CameraGetTarget(gv_pLAYER01_USER), EventUnitTargetPoint()) <= 4.0)) {
Wait(1.5, c_timeGame);
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.2, 2.0, 100.0, 2.0);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttutorial01.sc2map/MapScript.galaxy:4757
}
if (!((DistanceBetweenPoints(OrderGetTargetPoint(EventUnitOrder()), RegionGetCenter(RegionFromId(59))) <= 5.0))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttutorial01.sc2map/MapScript.galaxy:5286
}
if (!((DistanceBetweenPoints(OrderGetTargetPoint(EventUnitOrder()), RegionGetCenter(RegionFromId(59))) <= 5.0))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus02.sc2map/MapScript.galaxy:2358
lv_b = UnitGetPosition(gv_laserDrillTargetUnit);
lv_facing = AngleBetweenPoints(lv_a, lv_b);
lv_d = DistanceBetweenPoints(lv_a, lv_b);
lv_di = FixedToInt((lv_d / 5.0));
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus04.sc2map/MapScript.galaxy:838
if (lv_u == null) { break; }
lv_homeLoc = Point(UnitGetCustomValue(lv_u, 0), UnitGetCustomValue(lv_u, 1));
if ((DistanceBetweenPoints(UnitGetPosition(lv_u), lv_homeLoc) > 10.0)) {
UnitIssueOrder(lv_u, OrderTargetingPoint(AbilityCommand("attack", 0), lv_homeLoc), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:584
// Implementation
lv_distancetobase1 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(52)));
lv_distancetobase2 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(53)));
lv_distancetobase3 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(55)));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:585
// Implementation
lv_distancetobase1 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(52)));
lv_distancetobase2 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(53)));
lv_distancetobase3 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(55)));
if ((lv_distancetobase1 <= lv_distancetobase2) && (lv_distancetobase1 <= lv_distancetobase3)) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:586
lv_distancetobase1 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(52)));
lv_distancetobase2 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(53)));
lv_distancetobase3 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(55)));
if ((lv_distancetobase1 <= lv_distancetobase2) && (lv_distancetobase1 <= lv_distancetobase3)) {
return RegionFromId(52);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:612
// Implementation
lv_distancetobase1 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(16)));
lv_distancetobase2 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(19)));
lv_distancetobase3 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(20)));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:613
// Implementation
lv_distancetobase1 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(16)));
lv_distancetobase2 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(19)));
lv_distancetobase3 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(20)));
if ((lv_distancetobase1 <= lv_distancetobase2) && (lv_distancetobase1 <= lv_distancetobase3)) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:614
lv_distancetobase1 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(16)));
lv_distancetobase2 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(19)));
lv_distancetobase3 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(20)));
if ((lv_distancetobase1 <= lv_distancetobase2) && (lv_distancetobase1 <= lv_distancetobase3)) {
return RegionFromId(16);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:6995
}
if (!((DistanceBetweenPoints(UnitGetPosition(gv_sCV01), PointWithOffset(PointFromId(536), 0.0, 0.0)) <= 1.0))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7099
}
if (!((DistanceBetweenPoints(UnitGetPosition(gv_sCV01), PointWithOffset(PointFromId(595), 0.0, 0.0)) <= 1.0))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7142
}
if (!((DistanceBetweenPoints(UnitGetPosition(gv_sCV01), PointWithOffset(PointFromId(697), 0.0, 0.0)) <= 1.0))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7185
}
if (!((DistanceBetweenPoints(UnitGetPosition(gv_sCV01), PointWithOffset(PointFromId(742), 0.0, 0.0)) <= 1.0))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:596
UnitIssueOrder(lp_activatedunit, OrderTargetingPoint(AbilityCommand("attack", 0), lv_rallypoint), c_orderQueueReplace);
if ((UnitGetType(lp_activatedunit) == "Infestor")) {
UnitIssueOrder(lp_activatedunit, OrderTargetingPoint(AbilityCommand("InfestedTerrans", 0), RegionRandomPoint(RegionCircle(PointWithOffsetPolar(UnitGetPosition(lp_activatedunit), (DistanceBetweenPoints(lv_rallypoint, UnitGetPosition(lp_activatedunit)) - 2.0), AngleBetweenPoints(UnitGetPosition(lp_activatedunit), lv_rallypoint)), 1.5))), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:6635
autoCC422DC4_var = UnitGroupUnitFromEnd(autoCC422DC4_g, autoCC422DC4_u);
if (autoCC422DC4_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(autoCC422DC4_var), UnitGetPosition(gv_tHEONEOMEGALISK)) < 4.0) && (DistanceBetweenPoints(UnitGetPosition(autoCC422DC4_var), PointFromId(373)) >= 1.0) && (UnitGetCustomValue(autoCC422DC4_var, 0) == 0.0)) {
UnitSetCustomValue(autoCC422DC4_var, 0, 1.0);
gv__3OmegaliskRetreatUnit = autoCC422DC4_var;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:6635
autoCC422DC4_var = UnitGroupUnitFromEnd(autoCC422DC4_g, autoCC422DC4_u);
if (autoCC422DC4_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(autoCC422DC4_var), UnitGetPosition(gv_tHEONEOMEGALISK)) < 4.0) && (DistanceBetweenPoints(UnitGetPosition(autoCC422DC4_var), PointFromId(373)) >= 1.0) && (UnitGetCustomValue(autoCC422DC4_var, 0) == 0.0)) {
UnitSetCustomValue(autoCC422DC4_var, 0, 1.0);
gv__3OmegaliskRetreatUnit = autoCC422DC4_var;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:8319
UnitIssueOrder(auto8DBA43E6_var, Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
if ((UnitGetCustomValue(auto8DBA43E6_var, 0) < libNtve_gf_DifficultyValueFixed(3.0, 3.0, 4.0, 5.0))) {
UnitIssueOrder(auto8DBA43E6_var, OrderTargetingPoint(AbilityCommand("InfestedTerrans", 0), RegionRandomPoint(RegionCircle(PointWithOffsetPolar(UnitGetPosition(auto8DBA43E6_var), (DistanceBetweenPoints(lv_rallypoint, UnitGetPosition(auto8DBA43E6_var)) - 2.0), AngleBetweenPoints(UnitGetPosition(auto8DBA43E6_var), lv_rallypoint)), 1.5))), c_orderQueueReplace);
}
else {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:515
lv_defender = UnitGroupUnitFromEnd(auto98F04F6A_g, auto98F04F6A_u);
if (lv_defender == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(lv_defender), UnitGetPosition(lp_spawner)) > (lv_mutaRadius + 2.0)) && (UnitGetOwner(lv_defender) == gv_pLAYER_P08_MUTALISK_TOWERS)) {
UnitIssueOrder(lv_defender, OrderTargetingPoint(AbilityCommand("move", 0), UnitGetPosition(lp_spawner)), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian03.sc2map/MapScript.galaxy:2713
Wait(1.0, c_timeAI);
if ((DistanceBetweenPoints(UnitGetPosition(gv_leviathan), lv_leviathanHomePoint) >= 4.0)) {
UnitIssueOrder(gv_leviathan, OrderTargetingPoint(AbilityCommand("move", 0), lv_leviathanHomePoint), c_orderQueueReplace);
UnitIssueOrder(gv_leviathan, OrderTargetingPoint(AbilityCommand("move", 4), UnitGetPosition(gv_artifact)), c_orderQueueAddToEnd);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:7479
else {
UnitSetCustomValue(auto0685ADAD_var, 0, 0.0);
if ((DistanceBetweenPoints(UnitGetPosition(auto0685ADAD_var), Point(UnitGetCustomValue(auto0685ADAD_var, 1), UnitGetCustomValue(auto0685ADAD_var, 2))) <= DistanceBetweenPoints(UnitGetPosition(auto0685ADAD_var), Point(UnitGetCustomValue(auto0685ADAD_var, 3), UnitGetCustomValue(auto0685ADAD_var, 4))))) {
UnitIssueOrder(auto0685ADAD_var, OrderTargetingPoint(AbilityCommand("attack", 0), Point(UnitGetCustomValue(auto0685ADAD_var, 3), UnitGetCustomValue(auto0685ADAD_var, 4))), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:7479
else {
UnitSetCustomValue(auto0685ADAD_var, 0, 0.0);
if ((DistanceBetweenPoints(UnitGetPosition(auto0685ADAD_var), Point(UnitGetCustomValue(auto0685ADAD_var, 1), UnitGetCustomValue(auto0685ADAD_var, 2))) <= DistanceBetweenPoints(UnitGetPosition(auto0685ADAD_var), Point(UnitGetCustomValue(auto0685ADAD_var, 3), UnitGetCustomValue(auto0685ADAD_var, 4))))) {
UnitIssueOrder(auto0685ADAD_var, OrderTargetingPoint(AbilityCommand("attack", 0), Point(UnitGetCustomValue(auto0685ADAD_var, 3), UnitGetCustomValue(auto0685ADAD_var, 4))), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/terrancovertops.sc2map/MapScript.galaxy:512
lv_tier3 = 12;
gv_multikillCounter = UnitGroupCount(UnitGroup("MultiKillObject", c_playerAny, RegionCircle(gv_multiKillLastKillPosition, lv_range), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive);
if ((gv_multiKillLastNukePosition != null) && (gv_multiKillLastKillPosition != null) && (DistanceBetweenPoints(gv_multiKillLastNukePosition, gv_multiKillLastKillPosition) < 8.0)) {
gv_multiKillLastKillPosition = gv_multiKillLastNukePosition;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/zerginfestation.sc2map/MapScript.galaxy:509
lv_tier3 = 12;
gv_multikillCounter = UnitGroupCount(UnitGroup("MultiKillObject", c_playerAny, RegionCircle(gv_multiKillLastKillPosition, lv_range), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive);
if ((gv_multiKillLastNukePosition != null) && (gv_multiKillLastKillPosition != null) && (DistanceBetweenPoints(gv_multiKillLastNukePosition, gv_multiKillLastKillPosition) < 8.0)) {
gv_multiKillLastKillPosition = gv_multiKillLastNukePosition;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:1675
while ((lv_pointValid == false)) {
lv_target = PointWithOffset(lp_center, RandomFixed(-4.0, 4.0), RandomFixed(-1.5, 1.5));
if ((DistanceBetweenPoints(UnitGetPosition(lp_scienceVessel), lv_target) > 1.5)) {
lv_pointValid = true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:1797
// Implementation
lv_initialOffsetPoint = PointWithOffset(gv_terraTronPosition, lp_xOffset, lp_yOffset);
lv_distanceBetweenPoints = DistanceBetweenPoints(gv_terraTronPosition, lv_initialOffsetPoint);
lv_angleBetweenPoints = AngleBetweenPoints(gv_terraTronPosition, lv_initialOffsetPoint);
lv_scaledDistance = (lv_distanceBetweenPoints * gv_terraTronScale);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:2408
lv_k = 1;
for ( ; ( (auto39ACB433_ai >= 0 && lv_k <= auto39ACB433_ae) || (auto39ACB433_ai <= 0 && lv_k >= auto39ACB433_ae) ) ; lv_k += auto39ACB433_ai ) {
lv_distance = DistanceBetweenPoints(lp_positionOfViking, gv_presetSawTargets[lv_i][lv_k]);
if ((lv_distance < lv_bestDistance)) {
lv_bestDistance = lv_distance;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:6852
lv_center = Point(lv_waveInfo.lv_patternParam3, lv_waveInfo.lv_patternParam4);
lv_center = gf_ConvertShooterCoordToMapCoord(lv_center);
lv_radius = DistanceBetweenPoints(lv_center, lv_posTurn);
lv_angleStart = AngleBetweenPoints(lv_center, lv_posTurn);
lv_angleInterval = lv_waveInfo.lv_patternParam6;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:6876
}
lv_posCurrent = UnitGetPosition(lv_plane);
if ((DistanceBetweenPoints(lv_posCurrent, lv_posTurn) < 1.0)) {
break;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:7034
lv_y = (lv_yCoe * Sin(((lv_xCoe * lv_x) - lv_trigAngleStart)));
lv_alpha = AngleBetweenPoints(Point(0.0, 0.0), Point(lv_x, lv_y));
lv_distance = DistanceBetweenPoints(Point(0.0, 0.0), Point(lv_x, lv_y));
lv_posTarget = Point(((lv_distance * Cos((lv_alpha + lv_angle))) + PointGetX(lv_posSpawn)), ((lv_distance * Sin((lv_alpha + lv_angle))) + PointGetY(lv_posSpawn)));
libNtve_gf_MakeUnitFacePoint(lv_plane, lv_posTarget, 0.0625);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson01.sc2map — MapScript.galaxy:2498
lv_customIntValueOfUnit = FixedToInt(UnitGetCustomValue(lv_pickedUnit, 0));
if ((lv_customIntValueOfUnit > 0) && (lv_customIntValueOfUnit < 100)) {
if ((DistanceBetweenPoints(UnitGetPosition(lv_pickedUnit), gv_escortRouteRallyPoints[lv_customIntValueOfUnit]) <= 1.5)) {
UnitIssueOrder(lv_pickedUnit, OrderTargetingPoint(AbilityCommand("move", 0), gv_escortRouteRallyPoints[(lv_customIntValueOfUnit - 1)]), c_orderQueueReplace);
UnitSetCustomValue(lv_pickedUnit, 0, IntToFixed((lv_customIntValueOfUnit - 1)));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03b.sc2map — MapScript.galaxy:4099
auto6563E3CC_var = UnitGroupUnitFromEnd(auto6563E3CC_g, auto6563E3CC_u);
if (auto6563E3CC_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(auto6563E3CC_var), UnitGetPosition(gv_briefingZergling)) <= 7.0)) {
UnitBehaviorAdd(auto6563E3CC_var, "Run", auto6563E3CC_var, 1);
UnitIssueOrder(auto6563E3CC_var, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(63)), c_orderQueueReplace);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03b.sc2map — MapScript.galaxy:4110
auto2D2D84D2_var = UnitGroupUnitFromEnd(auto2D2D84D2_g, auto2D2D84D2_u);
if (auto2D2D84D2_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(auto2D2D84D2_var), UnitGetPosition(gv_briefingZergling)) <= 6.0)) {
UnitBehaviorAdd(auto2D2D84D2_var, "Run", auto2D2D84D2_var, 1);
UnitIssueOrder(auto2D2D84D2_var, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(63)), c_orderQueueReplace);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03b.sc2map — MapScript.galaxy:4148
autoC6F8DF42_var = UnitGroupUnitFromEnd(autoC6F8DF42_g, autoC6F8DF42_u);
if (autoC6F8DF42_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(autoC6F8DF42_var), UnitGetPosition(UnitFromId(491))) <= 5.0)) {
UnitBehaviorRemove(autoC6F8DF42_var, "Run", 1);
UnitIssueOrder(autoC6F8DF42_var, Order(AbilityCommand("MorphToInfestedCivilian", 0)), c_orderQueueReplace);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03b.sc2map — MapScript.galaxy:4160
autoE9C294DC_var = UnitGroupUnitFromEnd(autoE9C294DC_g, autoE9C294DC_u);
if (autoE9C294DC_var == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(autoE9C294DC_var), UnitGetPosition(UnitFromId(491))) <= 5.0)) {
UnitBehaviorRemove(autoE9C294DC_var, "Run", 1);
UnitIssueOrder(autoE9C294DC_var, Order(AbilityCommand("MorphToInfestedCivilian", 0)), c_orderQueueReplace);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:378
for ( ; ( (auto9E7AD11F_ai >= 0 && lv_i <= auto9E7AD11F_ae) || (auto9E7AD11F_ai < 0 && lv_i >= auto9E7AD11F_ae) ) ; lv_i += auto9E7AD11F_ai ) {
lv_distanceRemaining = lv_seperationDistance;
if ((lv_seperationDistance <= DistanceBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]))) {
lv_currentPoint = PointWithOffsetPolar(lv_currentPoint, lv_seperationDistance, AngleBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]));
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:383
else {
while (true) {
lv_distanceRemaining = (lv_distanceRemaining - DistanceBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]));
lv_currentTarget -= 1;
if ((lv_currentTarget < 1)) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:389
}
if ((lv_distanceRemaining <= DistanceBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]))) {
lv_currentPoint = PointWithOffsetPolar(gv_trainPath[lv_currentTarget], lv_distanceRemaining, AngleBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]));
break;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:576
for ( ; ( (auto46B67D1A_ai >= 0 && lv_i <= auto46B67D1A_ae) || (auto46B67D1A_ai < 0 && lv_i >= auto46B67D1A_ae) ) ; lv_i += auto46B67D1A_ai ) {
lv_distanceRemaining = lv_seperationDistance;
if ((lv_seperationDistance <= DistanceBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]))) {
lv_currentPoint = PointWithOffsetPolar(lv_currentPoint, lv_seperationDistance, AngleBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]));
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:581
else {
while (true) {
lv_distanceRemaining = (lv_distanceRemaining - DistanceBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]));
lv_currentTarget -= 1;
if ((lv_currentTarget == 1)) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:587
}
if ((lv_distanceRemaining <= DistanceBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]))) {
lv_currentPoint = PointWithOffsetPolar(gv_trainPath[lv_currentTarget], lv_distanceRemaining, AngleBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]));
break;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:3369
lv_i = gv_bottomStart;
for ( ; ( (auto65AE96E0_ai >= 0 && lv_i <= auto65AE96E0_ae) || (auto65AE96E0_ai < 0 && lv_i >= auto65AE96E0_ae) ) ; lv_i += auto65AE96E0_ai ) {
if ((DistanceBetweenPoints(gv_trainPath[lv_currentPingPoint], gv_trainPath[lv_i]) > 4.0)) {
lv_currentPingPoint = lv_i;
VisExploreArea(gv_pLAYER_01_USER, RegionCircle(gv_trainPath[lv_currentPingPoint], 12.0), true, false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:3383
lv_i = gv_bottomStart;
for ( ; ( (autoF8BC703D_ai >= 0 && lv_i <= autoF8BC703D_ae) || (autoF8BC703D_ai < 0 && lv_i >= autoF8BC703D_ae) ) ; lv_i += autoF8BC703D_ai ) {
if ((DistanceBetweenPoints(gv_trainPath[lv_currentPingPoint], gv_trainPath[lv_i]) > 4.0)) {
lv_currentPingPoint = lv_i;
VisExploreArea(gv_pLAYER_01_USER, RegionCircle(gv_trainPath[lv_currentPingPoint], 12.0), true, false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:3425
lv_i = gv_midStart;
for ( ; ( (auto76C315BA_ai >= 0 && lv_i <= auto76C315BA_ae) || (auto76C315BA_ai < 0 && lv_i >= auto76C315BA_ae) ) ; lv_i += auto76C315BA_ai ) {
if ((DistanceBetweenPoints(gv_trainPath[lv_currentPingPoint], gv_trainPath[lv_i]) > 4.0)) {
lv_currentPingPoint = lv_i;
VisExploreArea(gv_pLAYER_01_USER, RegionCircle(gv_trainPath[lv_currentPingPoint], 12.0), true, false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2map — MapScript.galaxy:3439
lv_i = gv_midStart;
for ( ; ( (auto550579DF_ai >= 0 && lv_i <= auto550579DF_ae) || (auto550579DF_ai < 0 && lv_i >= auto550579DF_ae) ) ; lv_i += auto550579DF_ai ) {
if ((DistanceBetweenPoints(gv_trainPath[lv_currentPingPoint], gv_trainPath[lv_i]) > 4.0)) {
lv_currentPingPoint = lv_i;
PingCreate(PlayerGroupAll(), "PingArrow", gv_trainPath[lv_currentPingPoint], ColorWithAlpha(100.00, 0.00, 0.00, 0.00), 6.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:3712
lv_y2 = PointGetY(lp_source);
lv_sourceAfterScaled = Point((lv_x1 + ((lv_x2 - lv_x1) * lp_xRatio)), (lv_y1 + ((lv_y2 - lv_y1) * lp_yRatio)));
lv_dis = DistanceBetweenPoints(lp_sourceCenter, lv_sourceAfterScaled);
lv_angel = AngleBetweenPoints(lp_sourceCenter, lv_sourceAfterScaled);
lv_angel += lp_rotate;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh01.sc2map — MapScript.galaxy:2161
lv_coCe = UnitLastCreated();
UnitIssueOrder(lv_coCe, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(863)), c_orderQueueReplace);
Wait(((DistanceBetweenPoints(PointFromId(862), PointFromId(863)) / UnitGetPropertyFixed(lv_coCe, c_unitPropMovementSpeed, c_unitPropCurrent)) + 0.0), c_timeGame);
if ((UnitIsAlive(lv_coCe) == true)) {
UIAlertUnit("Trigger", gv_p01_USER, StringExternal("Param/Value/19BDCD39"), null, lv_coCe);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:494
auto96AA0583_var = UnitGroupUnitFromEnd(auto96AA0583_g, auto96AA0583_u);
if (auto96AA0583_var == null) { break; }
lv_checkDistance = DistanceBetweenPoints(UnitGetPosition(auto96AA0583_var), PointFromId(13));
if ((lv_closestNodeMinDistance == 0.0)) {
lv_closestNodeMinDistance = lv_checkDistance;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:530
auto7CD40DCB_var = UnitGroupUnitFromEnd(auto7CD40DCB_g, auto7CD40DCB_u);
if (auto7CD40DCB_var == null) { break; }
lv_checkDistance = DistanceBetweenPoints(UnitGetPosition(auto7CD40DCB_var), PointFromId(13));
if ((lv_closestNodeMinDistance == 0.0)) {
lv_closestNodeMinDistance = lv_checkDistance;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:575
}
lv_probe01 = UnitGroupRandomUnit(UnitGroup("Probe", c_playerAny, RegionFromId(36), UnitFilter(0, 0, 0, 0), 0), c_unitCountAlive);
lv_probe01DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe01), UnitGetPosition(lv_canisterHarvestTarget));
lv_probe02 = UnitGroupRandomUnit(UnitGroup("Probe", c_playerAny, RegionFromId(38), UnitFilter(0, 0, 0, 0), 0), c_unitCountAlive);
lv_probe02DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe02), UnitGetPosition(lv_canisterHarvestTarget));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:577
lv_probe01DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe01), UnitGetPosition(lv_canisterHarvestTarget));
lv_probe02 = UnitGroupRandomUnit(UnitGroup("Probe", c_playerAny, RegionFromId(38), UnitFilter(0, 0, 0, 0), 0), c_unitCountAlive);
lv_probe02DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe02), UnitGetPosition(lv_canisterHarvestTarget));
if ((lv_probe01DistanceToCanister <= lv_probe02DistanceToCanister)) {
return lv_probe01;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2map — MapScript.galaxy:480
// Automatic Variable Declarations
// Implementation
if ((UnitGetPropertyFixed(gv_tosh, c_unitPropLifePercent, c_unitPropCurrent) < 100.0) && (DistanceBetweenPoints(UnitGetPosition(gv_tosh), UnitGetPosition(lp_medic)) <= 6.0)) {
libNtve_gf_AICast(lp_medic, OrderTargetingUnit(AbilityCommand("heal", 0), gv_tosh));
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2map — MapScript.galaxy:770
if (autoA878FA45_var == null) { break; }
UnitGroupAdd(gv_cellBlockAJerksGroup, autoA878FA45_var);
UnitSetCustomValue(autoA878FA45_var, 0, DistanceBetweenPoints(UnitGetPosition(autoA878FA45_var), PointFromId(1140)));
UnitSetCustomValue(autoA878FA45_var, 1, AngleBetweenPoints(PointFromId(1140), UnitGetPosition(autoA878FA45_var)));
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:398
// Automatic Variable Declarations
// Implementation
if ((UnitGetOwner(lp_unit) != gv_pLAYER01_USER) && (DistanceBetweenPoints(UnitGetPosition(lp_unit), lp_home) > lp_distance)) {
UnitIssueOrder(lp_unit, OrderTargetingPoint(AbilityCommand("move", 0), lp_home), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:1004
gv_novaNukeCount -= 1;
if ((DistanceBetweenPoints(CameraGetTarget(gv_pLAYER01_USER), EventUnitTargetPoint()) <= 4.0)) {
Wait(1.5, c_timeGame);
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.2, 2.0, 100.0, 2.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttutorial01.sc2map — MapScript.galaxy:4757
}
if (!((DistanceBetweenPoints(OrderGetTargetPoint(EventUnitOrder()), RegionGetCenter(RegionFromId(59))) <= 5.0))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttutorial01.sc2map — MapScript.galaxy:5286
}
if (!((DistanceBetweenPoints(OrderGetTargetPoint(EventUnitOrder()), RegionGetCenter(RegionFromId(59))) <= 5.0))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus02.sc2map — MapScript.galaxy:2358
lv_b = UnitGetPosition(gv_laserDrillTargetUnit);
lv_facing = AngleBetweenPoints(lv_a, lv_b);
lv_d = DistanceBetweenPoints(lv_a, lv_b);
lv_di = FixedToInt((lv_d / 5.0));
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus04.sc2map — MapScript.galaxy:838
if (lv_u == null) { break; }
lv_homeLoc = Point(UnitGetCustomValue(lv_u, 0), UnitGetCustomValue(lv_u, 1));
if ((DistanceBetweenPoints(UnitGetPosition(lv_u), lv_homeLoc) > 10.0)) {
UnitIssueOrder(lv_u, OrderTargetingPoint(AbilityCommand("attack", 0), lv_homeLoc), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:584
// Implementation
lv_distancetobase1 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(52)));
lv_distancetobase2 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(53)));
lv_distancetobase3 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(55)));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:585
// Implementation
lv_distancetobase1 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(52)));
lv_distancetobase2 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(53)));
lv_distancetobase3 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(55)));
if ((lv_distancetobase1 <= lv_distancetobase2) && (lv_distancetobase1 <= lv_distancetobase3)) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:586
lv_distancetobase1 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(52)));
lv_distancetobase2 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(53)));
lv_distancetobase3 = DistanceBetweenPoints(RegionGetCenter(lp_region), RegionGetCenter(RegionFromId(55)));
if ((lv_distancetobase1 <= lv_distancetobase2) && (lv_distancetobase1 <= lv_distancetobase3)) {
return RegionFromId(52);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:612
// Implementation
lv_distancetobase1 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(16)));
lv_distancetobase2 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(19)));
lv_distancetobase3 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(20)));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:613
// Implementation
lv_distancetobase1 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(16)));
lv_distancetobase2 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(19)));
lv_distancetobase3 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(20)));
if ((lv_distancetobase1 <= lv_distancetobase2) && (lv_distancetobase1 <= lv_distancetobase3)) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:614
lv_distancetobase1 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(16)));
lv_distancetobase2 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(19)));
lv_distancetobase3 = DistanceBetweenPoints(lp_point, RegionGetCenter(RegionFromId(20)));
if ((lv_distancetobase1 <= lv_distancetobase2) && (lv_distancetobase1 <= lv_distancetobase3)) {
return RegionFromId(16);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:6995
}
if (!((DistanceBetweenPoints(UnitGetPosition(gv_sCV01), PointWithOffset(PointFromId(536), 0.0, 0.0)) <= 1.0))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7099
}
if (!((DistanceBetweenPoints(UnitGetPosition(gv_sCV01), PointWithOffset(PointFromId(595), 0.0, 0.0)) <= 1.0))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7142
}
if (!((DistanceBetweenPoints(UnitGetPosition(gv_sCV01), PointWithOffset(PointFromId(697), 0.0, 0.0)) <= 1.0))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7185
}
if (!((DistanceBetweenPoints(UnitGetPosition(gv_sCV01), PointWithOffset(PointFromId(742), 0.0, 0.0)) <= 1.0))) {
return false;
}