# Point With Polar Offset

Grammarp offset by dist towards angle degrees
FlagsNative | Function

Returns a point offset by a distance toward an angle, specified in degrees.

# Arguments

  • point — Point
  • fixed — Distance
  • fixed — Angle

Returns — point

native point PointWithOffsetPolar(
	point p,
	fixed distance,
	fixed angle,
);

Category: Point / Offsets

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L663
PointWithOffsetPolar(lv_pos, (0.8 * IntToFixed(lv_index)), 90.0)
// L1800
PointWithOffsetPolar(gv_terraTronPosition, lv_scaledDistance, lv_angleBetweenPoints)
// L2995
PointWithOffsetPolar(lv_center, RandomFixed(3.0, 4.0), libNtve_gf_RandomAngle())
// L3014
PointWithOffsetPolar(UnitGetPosition(lp_powerup), 30.0, 270.0)
// L3104
PointWithOffsetPolar(lv_posCur, lv_moveUnit, AngleBetweenPoints(lv_posCur, lv_posNext))
// L4937
PointWithOffsetPolar(lv_posInterceptor, 30.0, lv_angle)
// L4940
PointWithOffsetPolar(lv_posInterceptor, 30.0, RandomFixed((lv_angle - 30.0), (lv_angle + 30.0)))
// L6344
PointWithOffsetPolar(UnitGetPosition(lv_plane), 30.0, lv_shootAngle)
// L6429
PointWithOffsetPolar(lv_posCurrent, 30.0, AngleBetweenPoints(lv_posCurrent, lv_posFinish))
// L6445
PointWithOffsetPolar(UnitGetPosition(lv_plane), 30.0, lv_shootAngle)
// L1273
PointWithOffsetPolar(UnitGetPosition(auto5E2EB195_var), RandomFixed(0.5, 1.5), RandomFixed(0.0, 360.0))
// L1428
PointWithOffsetPolar(UnitGetPosition(autoCE810A15_var), RandomFixed(0.5, 1.5), RandomFixed(0.0, 360.0))
// L3830
PointWithOffsetPolar(UnitGetPosition(lv_unit), 5.0, RandomFixed(30.0, 60.0))
// L5926
PointWithOffsetPolar(UnitGetPosition(auto7CDA312B_var), 6.0, 60.0)
// L331
PointWithOffsetPolar(UnitGetPosition(gv_purifier), lp_radius, lv_currentDegree)
// L3242
PointWithOffsetPolar(UnitGetPosition(lv_colonistShip), 5.0, RandomFixed(60.0, 70.0))
// L3359
PointWithOffsetPolar(UnitGetPosition(lv_colonistShip), 5.0, RandomFixed(95.0, 105.0))
// L3476
PointWithOffsetPolar(UnitGetPosition(lv_colonistShip), 5.0, RandomFixed(35.0, 45.0))
// L4532
PointWithOffsetPolar(PointFromId(4173), lv_broodLordDistance, AngleBetweenPoints(PointFromId(644), PointFromId(4173)))
// L4535
PointWithOffsetPolar(PointFromId(565), lv_broodLordDistance, AngleBetweenPoints(PointFromId(645), PointFromId(565)))
// L379
PointWithOffsetPolar(lv_currentPoint, lv_seperationDistance, AngleBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]))
// L390
PointWithOffsetPolar(gv_trainPath[lv_currentTarget], lv_distanceRemaining, AngleBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]))
// L577
PointWithOffsetPolar(lv_currentPoint, lv_seperationDistance, AngleBetweenPoints(lv_currentPoint, gv_trainPath[(lv_currentTarget - 1)]))
// L588
PointWithOffsetPolar(gv_trainPath[lv_currentTarget], lv_distanceRemaining, AngleBetweenPoints(gv_trainPath[lv_currentTarget], gv_trainPath[(lv_currentTarget - 1)]))
// L2062
PointWithOffsetPolar(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_waitPosition, gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarRadius, (PointGetFacing(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_waitPosition) + gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarAngle))
// L2069
PointWithOffsetPolar(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_waitPosition, gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarRadius, (PointGetFacing(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_waitPosition) + gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarAngle))
// L2155
PointWithOffsetPolar(UnitGetPosition(auto499A4BF2_var), 1.0, AngleBetweenPoints(UnitGetPosition(auto499A4BF2_var), gv_trainPath[FixedToInt(UnitGetCustomValue(auto499A4BF2_var, 0))]))
// L2518
PointWithOffsetPolar(UnitGetPosition(gv_trainList[lv_trainIndex].lv_trainCars[gv_trainList[lv_trainIndex].lv_lastCar]), 4.0, (UnitGetFacing(gv_trainList[lv_trainIndex].lv_trainCars[gv_trainList[lv_trainIndex].lv_lastCar]) + 90.0))
// L2522
PointWithOffsetPolar(UnitGetPosition(gv_trainList[lv_trainIndex].lv_trainCars[gv_trainList[lv_trainIndex].lv_lastCar]), 4.0, (UnitGetFacing(gv_trainList[lv_trainIndex].lv_trainCars[gv_trainList[lv_trainIndex].lv_lastCar]) + 270.0))
// L2525
PointWithOffsetPolar(UnitGetPosition(gv_trainList[lv_trainIndex].lv_trainCars[gv_trainList[lv_trainIndex].lv_lastCar]), 4.0, (UnitGetFacing(gv_trainList[lv_trainIndex].lv_trainCars[gv_trainList[lv_trainIndex].lv_lastCar]) + 180.0))
// L1552
PointWithOffsetPolar(UnitGetPosition(UnitFromId(739)), 30.0, 45.0)
// L1553
PointWithOffsetPolar(UnitGetPosition(UnitFromId(292)), 30.0, 45.0)
// L1554
PointWithOffsetPolar(UnitGetPosition(UnitFromId(738)), 30.0, 45.0)
// L1555
PointWithOffsetPolar(UnitGetPosition(UnitFromId(8)), 30.0, 45.0)
// L744
PointWithOffsetPolar(gv_briefingParadePoints[1], lp_polarDistance, (PointGetFacing(gv_briefingParadePoints[1]) + lp_polarRadius))
// L750
PointWithOffsetPolar(gv_briefingParadePoints[lv_i], lp_polarDistance, (PointGetFacing(gv_briefingParadePoints[lv_i]) + lp_polarRadius))
// L2562
PointWithOffsetPolar(UnitGetPosition(lv_scientist), RandomFixed(3.0, 9.0), (lv_angle + RandomFixed(-20.0, 20.0)))
// L2616
PointWithOffsetPolar(UnitGetPosition(lv_scientist), RandomFixed(8.0, 12.0), (AngleBetweenPoints(UnitGetPosition(lv_scientist), UnitGetPosition(UnitGroupUnit(lv_intruderGroup, 1))) + 180.0))
// L2672
PointWithOffsetPolar(UnitGetPosition(lv_scientist), RandomFixed(8.0, 12.0), (AngleBetweenPoints(UnitGetPosition(lv_scientist), UnitGetPosition(UnitGroupUnit(lv_brutaliskGroup, 1))) + 180.0))
// L2728
PointWithOffsetPolar(UnitGetPosition(lv_scientist), RandomFixed(8.0, 12.0), (AngleBetweenPoints(UnitGetPosition(lv_scientist), UnitGetPosition(UnitGroupUnit(lv_hybridGroup, 1))) + 180.0))
// L302
PointWithOffsetPolar(lp_targetPoint, 10.0, PointGetFacing(lp_targetPoint))
// L5055
PointWithOffsetPolar(PointFromId(1306), 1.0, (IntToFixed(lv_i) * 90.0))
// L5056
PointWithOffsetPolar(PointFromId(1307), 1.0, (IntToFixed(lv_i) * 90.0))
// L36
PointWithOffsetPolar(RegionGetCenter(lp_circle), RandomFixed(0.0, lv_radius), libNtve_gf_RandomAngle())
// L3657
PointWithOffsetPolar(lp_targetPoint, 10.0, PointGetFacing(lp_targetPoint))
// L3715
PointWithOffsetPolar(lp_targetCenter, lv_dis, lv_angel)
// L26409
PointWithOffsetPolar(UnitGetPosition(gf_ActorUnit(ge_ActorID_ActorRaynor)), 0.5, UnitGetFacing(gf_ActorUnit(ge_ActorID_ActorRaynor)))
// L26677
PointWithOffsetPolar(UnitGetPosition(gf_ActorUnit(ge_ActorID_ActorTychus)), 0.6, (UnitGetFacing(gf_ActorUnit(ge_ActorID_ActorTychus)) - 15.0))
// L28959
PointWithOffsetPolar(UnitGetPosition(gf_ActorUnit(ge_ActorID_ActorRaynor)), 0.4, (UnitGetFacing(gf_ActorUnit(ge_ActorID_ActorRaynor)) + 5.0))
// L28968
PointWithOffsetPolar(UnitGetPosition(gf_ActorUnit(ge_ActorID_ActorRaynor)), 0.4, (UnitGetFacing(gf_ActorUnit(ge_ActorID_ActorRaynor)) + 30.0))
// L29829
PointWithOffsetPolar(UnitGetPosition(gf_ActorUnit(ge_ActorID_ActorRaynor)), 1.0, (UnitGetFacing(gf_ActorUnit(ge_ActorID_ActorRaynor)) + 60.0))
// L30977
PointWithOffsetPolar(UnitGetPosition(gf_ActorUnit(ge_ActorID_ActorTosh)), 1.0, (UnitGetFacing(gf_ActorUnit(ge_ActorID_ActorTosh)) + -70.0))
// L33827
PointWithOffsetPolar(UnitGetPosition(gf_ActorUnit(ge_ActorID_ActorHanson)), 1.0, (UnitGetFacing(gf_ActorUnit(ge_ActorID_ActorHanson)) + 15.0))
// L36007
PointWithOffsetPolar(UnitGetPosition(gf_ActorUnit(ge_ActorID_ActorRaynor)), 1.0, (UnitGetFacing(gf_ActorUnit(ge_ActorID_ActorRaynor)) + 60.0))
// L286
PointWithOffsetPolar(lp_targetPoint, 10.0, PointGetFacing(lp_targetPoint))
// L2253
PointWithOffsetPolar(PointFromId(1140), UnitGetCustomValue(lv_tempUnit, 0), UnitGetCustomValue(lv_tempUnit, 1))
// L2258
PointWithOffsetPolar(PointFromId(1142), UnitGetCustomValue(lv_tempUnit, 0), UnitGetCustomValue(lv_tempUnit, 1))
// L2272
PointWithOffsetPolar(lv_movementTarget, UnitGetCustomValue(auto398840A4_var, 0), UnitGetCustomValue(auto398840A4_var, 1))
// L423
PointWithOffsetPolar(lp_moveTarget, 10.0, PointGetFacing(lp_moveTarget))
// L225
PointWithOffsetPolar(lp_point, 1.0, (IntToFixed(lv_i) * 90.0))
// L770
PointWithOffsetPolar(PointFromId(483), 1.0, PointGetFacing(PointFromId(483)))
// L774
PointWithOffsetPolar(PointFromId(484), 1.0, PointGetFacing(PointFromId(484)))
// L778
PointWithOffsetPolar(PointFromId(485), 1.0, PointGetFacing(PointFromId(485)))
// L782
PointWithOffsetPolar(PointFromId(486), 1.0, PointGetFacing(PointFromId(486)))
// L786
PointWithOffsetPolar(PointFromId(487), 1.0, PointGetFacing(PointFromId(487)))
// L790
PointWithOffsetPolar(PointFromId(488), 1.0, PointGetFacing(PointFromId(488)))
// L794
PointWithOffsetPolar(PointFromId(391), 1.0, PointGetFacing(PointFromId(391)))
// L5500
PointWithOffsetPolar(PointFromId(58), 1.5, (IntToFixed(lv_i) * (360.0 / IntToFixed(UnitGroupCount(lv_infantryGroup, c_unitCountAlive)))))
// L240
PointWithOffsetPolar(lp_center, lp_radius, lv_currentDegree)
// L3021
PointWithOffsetPolar(UnitGetPosition(lv_droppedBuilding), 8.0, RandomFixed(195.0, 255.0))
// L3024
PointWithOffsetPolar(UnitGetPosition(lv_droppedBuilding), 8.0, RandomFixed(285.0, 345.0))
// L596
PointWithOffsetPolar(UnitGetPosition(lp_activatedunit), (DistanceBetweenPoints(lv_rallypoint, UnitGetPosition(lp_activatedunit)) - 2.0), AngleBetweenPoints(UnitGetPosition(lp_activatedunit), lv_rallypoint))
// L1526
PointWithOffsetPolar(UnitGetPosition(autoCA9643E6_var), 2.0, UnitGetFacing(autoCA9643E6_var))
// L3667
PointWithOffsetPolar(UnitGetPosition(auto47B466D3_var), 2.0, UnitGetFacing(auto47B466D3_var))
// L4684
PointWithOffsetPolar(UnitGetPosition(lv_unit), 0.5, RandomFixed(240.0, 300.0))
// L5599
PointWithOffsetPolar(UnitGetPosition(autoB9055DE1_var), 2.0, UnitGetFacing(autoB9055DE1_var))
// L7535
PointWithOffsetPolar(UnitGetPosition(autoA454EC07_var), 2.0, UnitGetFacing(autoA454EC07_var))
// L8319
PointWithOffsetPolar(UnitGetPosition(auto8DBA43E6_var), (DistanceBetweenPoints(lv_rallypoint, UnitGetPosition(auto8DBA43E6_var)) - 2.0), AngleBetweenPoints(UnitGetPosition(auto8DBA43E6_var), lv_rallypoint))
// L8443
PointWithOffsetPolar(UnitGetPosition(lv_unit), 0.5, 270.0)
// L10595
PointWithOffsetPolar(UnitGetPosition(UnitLastCreated()), 5.0, AngleBetweenPoints(UnitGetPosition(UnitLastCreated()), PointFromId(2223)))
// L11809
PointWithOffsetPolar(UnitGetPosition(lv_nydusWorm), 0.5, 270.0)
// L1407
PointWithOffsetPolar(RegionRandomPoint(RegionCircle(UnitGetPosition(gv_leviathan), 8.0)), 8.0, UnitGetFacing(gv_leviathan))
// L653
PointWithOffsetPolar(lp_point, 1.0, (IntToFixed(lv_i) * 90.0))
// L3508
PointWithOffsetPolar(UnitGetPosition(gv_kerrigan), 3.0, ((360.0 / IntToFixed(gv_kerriganEscortNumber)) * IntToFixed(lv_i)))
// L4942
PointWithOffsetPolar(PointFromId(527), 1.0, PointGetFacing(PointFromId(527)))
// L4945
PointWithOffsetPolar(PointFromId(528), 1.0, PointGetFacing(PointFromId(528)))
// L5617
PointWithOffsetPolar(UnitGetPosition(autoE89A9445_var), 6.0, AngleBetweenPoints(UnitGetPosition(gv_artifact), UnitGetPosition(autoE89A9445_var)))
// L456
PointWithOffsetPolar(RegionGetCenter(lp_mRegion), 2.0, lv_angle)
// L2417
PointWithOffsetPolar(UnitGetPosition(auto1C41810C_var), 50.0, RandomFixed(215.0, 235.0))
// L2630
PointWithOffsetPolar(UnitGetPosition(gv_tHEONEZERATUL), RandomFixed(15.0, 25.0), lv_real)
// L2638
PointWithOffsetPolar(UnitGetPosition(gv_tHEONEZERATUL), RandomFixed(15.0, 25.0), lv_real)
// L2647
PointWithOffsetPolar(UnitGetPosition(gv_tHEONEZERATUL), RandomFixed(15.0, 25.0), lv_real)
// L2655
PointWithOffsetPolar(UnitGetPosition(gv_tHEONEZERATUL), RandomFixed(15.0, 25.0), lv_real)
// L2664
PointWithOffsetPolar(UnitGetPosition(gv_tHEONEZERATUL), RandomFixed(15.0, 25.0), lv_real)
// L2672
PointWithOffsetPolar(UnitGetPosition(gv_tHEONEZERATUL), RandomFixed(15.0, 25.0), lv_real)
// L2687
PointWithOffsetPolar(UnitGetPosition(gv_tHEONEZERATUL), RandomFixed(15.0, 25.0), lv_real)
// L2695
PointWithOffsetPolar(UnitGetPosition(gv_tHEONEZERATUL), RandomFixed(15.0, 25.0), lv_real)
// L6951
PointWithOffsetPolar(PointFromId(345), 0.0, 0.0)
// L1289
PointWithOffsetPolar(UnitGetPosition(EventUnitProgressUnit()), 33.0, 45.0)
// L1292
PointWithOffsetPolar(UnitGetPosition(EventUnitProgressUnit()), 22.0, 45.0)