# Point Offset Towards Point

GrammarsourcePoint|Point offset by distance towards targetPoint|Point
FlagsFunction

Returns a point offset by a specified distance toward a target point.

# Arguments

  • point — SourcePoint
  • fixed — Distance
  • point — TargetPoint

Returns — point

point libNtve_gf_PointOffsetTowardsPoint(
	point lp_sourcePoint,
	fixed lp_distance,
	point lp_targetPoint,
);

Category: Point / Offsets

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L5962
libNtve_gf_PointOffsetTowardsPoint(gv_lastSawPosition, 50.0, lv_sawTargetPoint)
// L6023
libNtve_gf_PointOffsetTowardsPoint(lv_currentSawPosition, 50.0, lv_reflectionVector)
// L4928
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto5CDEE1E7_var), 1.0, Point(47.0, 77.0))
// L2629
libNtve_gf_PointOffsetTowardsPoint(RegionGetCenter(RegionFromId(50)), 2.0, UnitGetPosition(lv_guard))
// L2377
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(EventUnit()), -6.0, UnitGetPosition(gv_uNITDaMothership))
// L533
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_nydus), 1.0, UnitGetPosition(gv_artifact))
// L1653
libNtve_gf_PointOffsetTowardsPoint(PointFromId(181), 0.0, PointFromId(345))
// L5962
libNtve_gf_PointOffsetTowardsPoint(gv_lastSawPosition, 50.0, lv_sawTargetPoint)
// L6023
libNtve_gf_PointOffsetTowardsPoint(lv_currentSawPosition, 50.0, lv_reflectionVector)
// L4928
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto5CDEE1E7_var), 1.0, Point(47.0, 77.0))
// L2629
libNtve_gf_PointOffsetTowardsPoint(RegionGetCenter(RegionFromId(50)), 2.0, UnitGetPosition(lv_guard))
// L2377
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(EventUnit()), -6.0, UnitGetPosition(gv_uNITDaMothership))
// L533
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_nydus), 1.0, UnitGetPosition(gv_artifact))
// L1653
libNtve_gf_PointOffsetTowardsPoint(PointFromId(181), 0.0, PointFromId(345))
// L4779
libNtve_gf_PointOffsetTowardsPoint(PointFromId(222), (auto5598168F_var * lv_distanceIncrement), PointFromId(13))
// L974
libNtve_gf_PointOffsetTowardsPoint(libNtve_gf_CenterOfUnitGroup(lp_unitgroup), (lv_distbwpings * IntToFixed(lv_foreachint_i)), lp_endpoint)
// L528
libNtve_gf_PointOffsetTowardsPoint(lp_point, -1.0, UnitGetPosition(lp_creator))
// L2966
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(autoE2EEC058_var), 0.5, PointFromId(4))
// L2994
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto6CB67634_var), 0.5, PointFromId(4))
// L2996
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto6CB67634_var), 0.5, PointFromId(4))
// L2954
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_kerrigan), 2.0, PointFromId(1239))
// L4993
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(autoC7293722_var), 4.0, UnitGetPosition(gv_kerrigan))
// L6856
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto6544E1DC_var), 4.0, UnitGetPosition(gv_kerrigan))
// L411
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lv_targetUnit), 3.0, UnitGetPosition(lp_observer))
// L2046
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto188EF1B3_var), 10.0, RegionGetCenter(RegionFromId(11)))
// L4779
libNtve_gf_PointOffsetTowardsPoint(PointFromId(222), (auto5598168F_var * lv_distanceIncrement), PointFromId(13))
// L974
libNtve_gf_PointOffsetTowardsPoint(libNtve_gf_CenterOfUnitGroup(lp_unitgroup), (lv_distbwpings * IntToFixed(lv_foreachint_i)), lp_endpoint)
// L528
libNtve_gf_PointOffsetTowardsPoint(lp_point, -1.0, UnitGetPosition(lp_creator))
// L2966
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(autoE2EEC058_var), 0.5, PointFromId(4))
// L2994
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto6CB67634_var), 0.5, PointFromId(4))
// L2996
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto6CB67634_var), 0.5, PointFromId(4))
// L2954
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_kerrigan), 2.0, PointFromId(1239))
// L4993
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(autoC7293722_var), 4.0, UnitGetPosition(gv_kerrigan))
// L6856
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto6544E1DC_var), 4.0, UnitGetPosition(gv_kerrigan))
// L411
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lv_targetUnit), 3.0, UnitGetPosition(lp_observer))
// L2046
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto188EF1B3_var), 10.0, RegionGetCenter(RegionFromId(11)))

# campaigns/swarmstory.sc2campaign

SwarmCampaignDataHelperLib.galaxy

// L94
libNtve_gf_PointOffsetTowardsPoint(lv_k, 8.0, lv_t)
// L97
libNtve_gf_PointOffsetTowardsPoint(lv_k, lv_distance, lv_t)

# campaigns/void.sc2campaign

MapScript.galaxy

// L625
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(UnitGroupRandomUnit(lv_enemyGroup9, c_unitCountAlive)), RandomFixed(0.0, 4.0), UnitGetPosition(lp_infestor))
// L534
libNtve_gf_PointOffsetTowardsPoint(RegionGetCenter(lp_movingRegion), 0.01, RegionGetCenter(RegionEntireMap()))
// L839
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_karax), 4.0, UnitGetPosition(UnitGroupRandomUnit(lv_enemyGroup10, c_unitCountAlive)))
// L890
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_alarak), 4.0, UnitGetPosition(UnitGroupClosestToPoint(lv_enemyGroup8, UnitGetPosition(lp_alarak))))
// L916
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_vorazun), 5.0, UnitGetPosition(UnitGroupClosestToPoint(lv_enemyGroup8, UnitGetPosition(lp_vorazun))))
// L548
libNtve_gf_PointOffsetTowardsPoint(lv_currentTarget, 1.5, lp_point3)
// L549
libNtve_gf_PointOffsetTowardsPoint(lv_baseOffsetPoint, 0.5, lp_point2)
// L5319
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_victoryAlarak), 2.0, gv_finalShrineLocation)
// L5324
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_victoryAlarak), 3.0, gv_finalShrineLocation)
// L1686
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_tugOfWarBubbleUnit), 1.5, PointFromName(("PathWaypoint" + gf_FormatIntegerIntoMultiDigitString(gv_tugOfWar_ReverseWaypoint, 1))))
// L1687
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_tugOfWarBubbleUnit), 1.5, PointFromName(("PathWaypoint" + gf_FormatIntegerIntoMultiDigitString(gv_tugOfWar_ForwardWaypoint, 1))))
// L2566
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(autoF6B58830_var), -20.0, UnitGetPosition(gv_kERRIGAN))
// L2621
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto850290AD_var), -20.0, UnitGetPosition(gv_kERRIGAN))
// L625
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(UnitGroupRandomUnit(lv_enemyGroup9, c_unitCountAlive)), RandomFixed(0.0, 4.0), UnitGetPosition(lp_infestor))
// L534
libNtve_gf_PointOffsetTowardsPoint(RegionGetCenter(lp_movingRegion), 0.01, RegionGetCenter(RegionEntireMap()))
// L839
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_karax), 4.0, UnitGetPosition(UnitGroupRandomUnit(lv_enemyGroup10, c_unitCountAlive)))
// L890
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_alarak), 4.0, UnitGetPosition(UnitGroupClosestToPoint(lv_enemyGroup8, UnitGetPosition(lp_alarak))))
// L916
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_vorazun), 5.0, UnitGetPosition(UnitGroupClosestToPoint(lv_enemyGroup8, UnitGetPosition(lp_vorazun))))
// L548
libNtve_gf_PointOffsetTowardsPoint(lv_currentTarget, 1.5, lp_point3)
// L549
libNtve_gf_PointOffsetTowardsPoint(lv_baseOffsetPoint, 0.5, lp_point2)
// L5319
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_victoryAlarak), 2.0, gv_finalShrineLocation)
// L5324
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_victoryAlarak), 3.0, gv_finalShrineLocation)
// L1686
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_tugOfWarBubbleUnit), 1.5, PointFromName(("PathWaypoint" + gf_FormatIntegerIntoMultiDigitString(gv_tugOfWar_ReverseWaypoint, 1))))
// L1687
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(gv_tugOfWarBubbleUnit), 1.5, PointFromName(("PathWaypoint" + gf_FormatIntegerIntoMultiDigitString(gv_tugOfWar_ForwardWaypoint, 1))))
// L2566
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(autoF6B58830_var), -20.0, UnitGetPosition(gv_kERRIGAN))
// L2621
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(auto850290AD_var), -20.0, UnitGetPosition(gv_kERRIGAN))

# campaigns/voidstory.sc2campaign

VoidCampaignMissionLib.galaxy

// L5653
libNtve_gf_PointOffsetTowardsPoint(lv_k, 10.0, lv_t)
// L5656
libNtve_gf_PointOffsetTowardsPoint(lv_k, lv_distance, lv_t)
// L5737
libNtve_gf_PointOffsetTowardsPoint(lv_k, 8.0, lv_t)
// L5740
libNtve_gf_PointOffsetTowardsPoint(lv_k, lv_distance, lv_t)
// L5821
libNtve_gf_PointOffsetTowardsPoint(lv_k, 12.0, lv_t)
// L5824
libNtve_gf_PointOffsetTowardsPoint(lv_k, lv_distance, lv_t)

# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod

LibPEB1.galaxy

// L5059
libNtve_gf_PointOffsetTowardsPoint(lv_basePoint, lv_currentOffsetAmount, lv_offsetPoint)

# mods/heroesdata.stormmod

AILib.galaxy

// L2250
libNtve_gf_PointOffsetTowardsPoint(lp_selfPosition, (lv_searchRadius - lv_offsetFromEdge), lp_otherPoint)

# mods/heroesdata.stormmod

GameDataHelperLib.galaxy

// L277
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle1C * -1.0), lv_casterPoint)
// L280
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle2C * -1.0), lv_casterPoint)
// L303
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle1C * -1.0), lv_casterPoint)
// L306
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle2C * -1.0), lv_casterPoint)
// L329
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle1C * -1.0), lv_casterPoint)
// L332
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle2C * -1.0), lv_casterPoint)
// L355
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle1C * -1.0), lv_casterPoint)
// L358
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle2C * -1.0), lv_casterPoint)
// L1310
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(libGame_gv_players[lp_player].lv_activeVehicle), 2.0, UnitGetPosition(libGDHL_gv_heroJainaWaterElemental[lp_player]))
// L2666
libNtve_gf_PointOffsetTowardsPoint(libGame_gv_players[lp_player].lv_spawnPoint, -1.5, UnitGetPosition(libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_player)].lv_core))

# mods/heroesdata.stormmod

GameLib.galaxy

// L8793
libNtve_gf_PointOffsetTowardsPoint(lv_basePoint, lv_currentOffsetAmount, lv_offsetPoint)
// L9227
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_minion), 1.0, UnitGetPosition(libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lp_minion))].lv_core))
// L9237
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lp_minion), 1.0, UnitGetPosition(libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_killingPlayer)].lv_core))
// L12528
libNtve_gf_PointOffsetTowardsPoint(lp_vehicleLocation, lv_modifiedDistance, UnitGetPosition(lv_driverUnit))
// L16214
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint)
// L16215
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint)
// L16220
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint)
// L16245
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint)
// L16246
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint)
// L16251
libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint)

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L3562
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lv_u), lv_beam_count, UnitGetPosition(libMapM_gv_mMGardensDragonDragonTowers[libMapM_gv_mMGardensDragonDragonTowerCount].lv_shrineBeamTargetUnit))
// L3594
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lv_u), lv_beam_count, UnitGetPosition(libMapM_gv_mMGardensDragonDragonTowers[libMapM_gv_mMGardensDragonDragonTowerCount].lv_shrineBeamTargetUnit))

# mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmod

LibMHtM.galaxy

// L2016
libNtve_gf_PointOffsetTowardsPoint(lv_skullPosition, 0.5, lv_centerOfClosestRegion)

# mods/heroesmapmods/battlegroundmapmods/infernalshrines.stormmod

LibMSHE.galaxy

// L2066
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(EventPlayerEffectUsedUnit(c_effectUnitCaster)), lv_abilityRange, lv_playerTargetPoint)
// L2074
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(EventPlayerEffectUsedUnit(c_effectUnitCaster)), lv_modifiedDistance, lv_playerTargetPoint)
// L2076
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(EventPlayerEffectUsedUnit(c_effectUnitCaster)), lv_modifiedDistance, lv_playerTargetPoint)
// L2078
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(EventPlayerEffectUsedUnit(c_effectUnitCaster)), lv_modifiedDistance, lv_playerTargetPoint)
// L2080
libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(EventPlayerEffectUsedUnit(c_effectUnitCaster)), lv_modifiedDistance, lv_playerTargetPoint)