# Goal Position Of Unit
Grammar — Goal Position of u
Flags —Native
|Function
Returns the goal (target) position of a unit.
# Arguments
unit
— Unit
Returns — point
native point UnitGetGoalPosition(unit inUnit);
# Related
Category: Unit / Basic
- Unit Show Kill Display —
void
— UnitShowKillDisplay - Unit Can Path To Point —
bool
— UnitPathableToPoint - Unit Can Path To Unit —
bool
— UnitPathableToUnit - Create Units With Default Facing —
void
— libNtve_gf_CreateUnitsWithDefaultFacing - Create Units With Point Facing —
void
— libNtve_gf_CreateUnitsAtPoint2 - Create Units Facing Angle —
unitgroup
— UnitCreate - Create Units Facing Point —
unitgroup
— libNtve_gf_UnitCreateFacingPoint - Last Created Unit —
unit
— UnitLastCreated - Last Created Units —
unitgroup
— UnitLastCreatedGroup - Original Caster Of Unit —
unit
— UnitGetOriginalCaster - Effect That Created Unit —
string
<gamelink::Effect> — UnitGetOriginalEffect - Replace Unit —
void
— libNtve_gf_ReplaceUnit - Last Replaced Unit —
unit
— libNtve_gf_LastReplacedUnit - Change Owner —
void
— UnitSetOwner - Unit Owner Changes —
void
— TriggerAddEventUnitChangeOwner - Old Unit Owner —
int
— EventUnitOwnerOld - New Unit Owner —
int
— EventUnitOwnerNew - Rescue Unit —
void
— libNtve_gf_RescueUnit - Rescue Unit Group —
void
— libNtve_gf_RescueUnit2 - Kill Unit —
void
— UnitKill - Revive Unit —
void
— UnitRevive - Remove Unit —
void
— UnitRemove - Owner Of Unit —
int
— UnitGetOwner - Unit Is Alive —
bool
— UnitIsAlive - Unit Is Valid —
bool
— UnitIsValid - Unit Group Is Dead —
bool
— libNtve_gf_UnitGroupIsDead - Move Unit Instantly —
void
— UnitSetPosition - Make Unit Face Angle —
void
— UnitSetFacing - Make Unit Face Point —
void
— libNtve_gf_MakeUnitFacePoint - Position Of Unit —
point
— UnitGetPosition - Goal Position Of Unit —
point
— UnitGetGoalPosition - Facing Angle Of Unit —
fixed
— UnitGetFacing - Pause/Unpause Unit —
void
— libNtve_gf_PauseUnit - Pause/Unpause All Units —
void
— UnitPauseAll - Sleep/WakeUp Unit —
void
— libNtve_gf_SleepUnit - Show/Hide Unit —
void
— libNtve_gf_ShowHideUnit - Share Vision of Unit —
void
— libNtve_gf_ShareVisionofUnit - Unit Is Paused —
bool
— libNtve_gf_UnitIsPaused - Unit Is Sleepiing —
bool
— libNtve_gf_UnitIsSleepiing - Unit Is Hidden —
bool
— libNtve_gf_UnitIsHidden - Unit Is Visible To Player —
bool
— libNtve_gf_UnitIsVisibleToPlayer - Set Unit Custom Value —
void
— UnitSetCustomValue - Custom Value Of Unit —
fixed
— UnitGetCustomValue - Unit Enters/Leaves Region —
void
— TriggerAddEventUnitRegion - Triggering Region —
region
— EventUnitRegion - Unit Enters/Leaves Point —
void
— TriggerAddEventUnitRangePoint - Unit Enters/Leaves Range Of Unit —
void
— TriggerAddEventUnitRange - Triggering Range Unit —
unit
— EventUnitRangeUnit - Unit In Region —
bool
— libNtve_gf_UnitInRegion - Triggering Unit —
unit
— EventUnit - Load Unit Model —
void
— UnitLoadModel - Unload Unit Model —
void
— UnitUnloadModel - Agent Of Player For Unit —
unit
— UnitAgent - Change Empty Unit Variables In Events —
void
— UnitEventSetNullVariableInvalid - Name of Unit —
text
— UnitGetName - Ideal Harvester Count —
int
— UnitIdealWorkerCount - Current Harvester Count —
int
— UnitCurrentWorkerCount
# Examples
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pulnar01.sc2map/MapScript.galaxy:473
auto2439952A_var = UnitGroupUnitFromEnd(auto2439952A_g, auto2439952A_u);
if (auto2439952A_var == null) { break; }
if ((AIUnitGetWave(auto2439952A_var) == null) && (RegionContainsPoint(gv_celestialLocks[lp_index].lv_defenseRegion, UnitGetGoalPosition(auto2439952A_var)) == true)) {
AIRemoveUnitFromAnyWavesAndSetHome(auto2439952A_var, PlayerStartLocation(UnitGetOwner(auto2439952A_var)));
UnitIssueOrder(auto2439952A_var, OrderTargetingPoint(null, PlayerStartLocation(UnitGetOwner(auto2439952A_var))), c_orderQueueReplace);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar01.sc2map — MapScript.galaxy:473
auto2439952A_var = UnitGroupUnitFromEnd(auto2439952A_g, auto2439952A_u);
if (auto2439952A_var == null) { break; }
if ((AIUnitGetWave(auto2439952A_var) == null) && (RegionContainsPoint(gv_celestialLocks[lp_index].lv_defenseRegion, UnitGetGoalPosition(auto2439952A_var)) == true)) {
AIRemoveUnitFromAnyWavesAndSetHome(auto2439952A_var, PlayerStartLocation(UnitGetOwner(auto2439952A_var)));
UnitIssueOrder(auto2439952A_var, OrderTargetingPoint(null, PlayerStartLocation(UnitGetOwner(auto2439952A_var))), c_orderQueueReplace);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:19371
UnitCreateEffectUnit(lv_rexxar, "RexxarMishaApplyBasicAttackDamageResponseController", lv_misha);
UnitCreateEffectUnit(lv_misha, "RexxarMishaApplyBasicAttackDamageResponseController2", lv_rexxar);
libNtve_gf_MakeUnitFacePoint(lv_misha, PointWithOffset(UnitGetGoalPosition(lv_rexxar), 0.0, -5.0), 0.0);
if ((UnitGetType(libGame_gv_players[lv_rexxarPlayer].lv_heroUnit) == "HeroAbathur")) {
lv_rexxar = libGame_gv_players[lv_rexxarPlayer].lv_activeVehicle;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:27274
if ((UnitIsValid(lv_purifier) == true) && (TechTreeUpgradeCount(lv_p, "ZeratulArtifactTier3_RoboticsBay", c_techCountCompleteOnly) >= 1)) {
lv_spawnPoint = UnitGetPosition(lv_u);
lv_goal = UnitGetGoalPosition(lv_u);
if ((lv_spawnPoint != lv_goal)) {
lv_mainAngel = AngleBetweenPoints(lv_spawnPoint, lv_goal);
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:357
if ((libCore_gf_IsAbilityOnCooldown(lib1035AFB3_gv_johanna, "CrusaderPunish") == false)) {
UnitIssueOrder(lib1035AFB3_gv_johanna, OrderTargetingPoint(AbilityCommand("CrusaderPunish", 0), UnitGetGoalPosition(lib1035AFB3_gv_johanna)), c_orderQueueReplace);
return true;
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:365
}
else if ((libCore_gf_IsAbilityOnCooldown(lib1035AFB3_gv_johanna, "CrusaderShieldGlare") == false)) {
UnitIssueOrder(lib1035AFB3_gv_johanna, OrderTargetingPoint(AbilityCommand("CrusaderShieldGlare", 0), UnitGetGoalPosition(lib1035AFB3_gv_johanna)), c_orderQueueReplace);
return true;
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:394
UnitIssueOrder(lib1035AFB3_gv_azmodan, Order(AbilityCommand("AzmodanAllShallBurnCancel", 0)), c_orderQueueReplace);
if ((libCore_gf_IsAbilityOnCooldown(lib1035AFB3_gv_azmodan, "AzmodanGlobeOfAnnihilation") == false)) {
UnitIssueOrder(lib1035AFB3_gv_azmodan, OrderTargetingPoint(AbilityCommand("AzmodanGlobeOfAnnihilation", 0), UnitGetGoalPosition(lib1035AFB3_gv_azmodan)), c_orderQueueReplace);
return true;
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:398
}
else if ((UnitAbilityChargeInfo(lib1035AFB3_gv_azmodan, AbilityCommand("AzmodanSummonDemonWarrior", 0), c_unitAbilChargeCountLeft) >= 1)) {
UnitIssueOrder(lib1035AFB3_gv_azmodan, OrderTargetingPoint(AbilityCommand("AzmodanSummonDemonWarrior", 0), UnitGetGoalPosition(lib1035AFB3_gv_azmodan)), c_orderQueueReplace);
return true;
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:402
}
else if ((libCore_gf_IsAbilityOnCooldown(lib1035AFB3_gv_azmodan, "AzmodanDemonicInvasion") == false)) {
UnitIssueOrder(lib1035AFB3_gv_azmodan, OrderTargetingPoint(AbilityCommand("AzmodanDemonicInvasion", 0), UnitGetGoalPosition(lib1035AFB3_gv_azmodan)), c_orderQueueReplace);
return true;
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:480
if ((libCore_gf_IsAbilityOnCooldown(lib1035AFB3_gv_nazeebo, "WitchDoctorZombieWall") == false)) {
UnitIssueOrder(lib1035AFB3_gv_nazeebo, OrderTargetingPoint(AbilityCommand("WitchDoctorZombieWall", 0), UnitGetGoalPosition(lib1035AFB3_gv_nazeebo)), c_orderQueueReplace);
return true;
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:484
}
else if ((libCore_gf_IsAbilityOnCooldown(lib1035AFB3_gv_nazeebo, "WitchDoctorCorpseSpiders") == false)) {
UnitIssueOrder(lib1035AFB3_gv_nazeebo, OrderTargetingPoint(AbilityCommand("WitchDoctorCorpseSpiders", 0), UnitGetGoalPosition(lib1035AFB3_gv_nazeebo)), c_orderQueueReplace);
return true;
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:488
}
else if ((UnitAbilityChargeInfo(lib1035AFB3_gv_nazeebo, AbilityCommand("WitchDoctorPlagueofToads", 0), c_unitAbilChargeCountLeft) >= 1)) {
UnitIssueOrder(lib1035AFB3_gv_nazeebo, OrderTargetingPoint(AbilityCommand("WitchDoctorPlagueofToads", 0), UnitGetGoalPosition(lib1035AFB3_gv_nazeebo)), c_orderQueueReplace);
return true;
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:520
}
else if ((libCore_gf_IsAbilityOnCooldown(lib1035AFB3_gv_kelThuzad, "KelThuzadDeathAndDecay") == false)) {
UnitIssueOrder(lib1035AFB3_gv_kelThuzad, OrderTargetingPoint(AbilityCommand("KelThuzadDeathAndDecay", 0), UnitGetGoalPosition(lib1035AFB3_gv_kelThuzad)), c_orderQueueReplace);
return true;
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:524
}
else if ((libCore_gf_IsAbilityOnCooldown(lib1035AFB3_gv_kelThuzad, "KelThuzadChains") == false)) {
UnitIssueOrder(lib1035AFB3_gv_kelThuzad, OrderTargetingPoint(AbilityCommand("KelThuzadChains", 0), UnitGetGoalPosition(lib1035AFB3_gv_nazeebo)), c_orderQueueReplace);
return true;
}