# Find Placement From Point For Unit Type
Grammar — Find Placement From source Point For Unit Type unitType And Player player With Range range
Flags —Native
|Function
# Arguments
string
<gamelink::Unit> — Unit Typeint
— Playerpoint
— Sourcefixed
— Range
Returns — point
native point UnitTypePlacementFromPoint(
string inType,
int inPlayer,
point inSource,
fixed inRange,
);
# Related
Category: Unit / Placement
- Move Blockers From Point For Unit Type —
int
— UnitTypeMoveBlockersFromPoint - Move Blockers From Unit For Unit Type —
int
— UnitTypeMoveBlockersFromUnit - Find Placement From Point For Unit Type —
point
— UnitTypePlacementFromPoint - Find Placement From Unit For Unit Type —
point
— UnitTypePlacementFromUnit - Find Placement From Point For Unit Type With Tests —
point
— UnitTypePlacementTestsFromPoint - Find Placement From Unit For Unit Type With Tests —
point
— UnitTypePlacementTestsFromUnit
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zkorhal01.sc2map/MapScript.galaxy:799
if ((UnitGetType(autoEACA5FB9_var) != "ZergDropPod") && (autoEACA5FB9_var != UnitLastCreated())) {
if (((UnitGetOwner(autoEACA5FB9_var) == gv_pLAYER_01_USER) || (libNtve_gf_PlayerIsEnemy(gv_pLAYER_01_USER, UnitGetOwner(autoEACA5FB9_var), libNtve_ge_PlayerRelation_Ally) == true))) {
UnitSetPosition(autoEACA5FB9_var, UnitTypePlacementFromPoint("KorhalSporeCannon", UnitGetOwner(autoEACA5FB9_var), lp_dROP_LOCATION, 4.0), true);
}
else {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal01.sc2map — MapScript.galaxy:799
if ((UnitGetType(autoEACA5FB9_var) != "ZergDropPod") && (autoEACA5FB9_var != UnitLastCreated())) {
if (((UnitGetOwner(autoEACA5FB9_var) == gv_pLAYER_01_USER) || (libNtve_gf_PlayerIsEnemy(gv_pLAYER_01_USER, UnitGetOwner(autoEACA5FB9_var), libNtve_ge_PlayerRelation_Ally) == true))) {
UnitSetPosition(autoEACA5FB9_var, UnitTypePlacementFromPoint("KorhalSporeCannon", UnitGetOwner(autoEACA5FB9_var), lp_dROP_LOCATION, 4.0), true);
}
else {
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:1296
if ((UnitGetType(autoEFB1326A_var) != "ZergDropPodLarge") && (autoEFB1326A_var != UnitLastCreated())) {
if (((UnitGetOwner(autoEFB1326A_var) == lp_player) || (libNtve_gf_PlayerIsEnemy(lp_player, UnitGetOwner(autoEFB1326A_var), libNtve_ge_PlayerRelation_Ally) == true))) {
UnitSetPosition(autoEFB1326A_var, UnitTypePlacementFromPoint(lp_buildingType, UnitGetOwner(autoEFB1326A_var), lp_landingPoint, 4.0), true);
}
else {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:3332
if ((UnitGetType(auto5CF01D86_var) != "ZergDropPodLarge") && (auto5CF01D86_var != UnitLastCreated())) {
if (((UnitGetOwner(auto5CF01D86_var) == lp_player) || (libNtve_gf_PlayerIsEnemy(lp_player, UnitGetOwner(auto5CF01D86_var), libNtve_ge_PlayerRelation_Ally) == true))) {
UnitSetPosition(auto5CF01D86_var, UnitTypePlacementFromPoint(lp_buildingType, UnitGetOwner(auto5CF01D86_var), lp_landingPoint, 4.0), true);
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:5171
PlayerSetSkin(lv_abathurPlayer, libGame_gv_players[UnitGetOwner(lv_target)].lv_skinData.lv_skinID);
if ((UnitGetOwner(lv_target) <= libCore_gv_bALMaxPlayers) && (libGame_gv_players[UnitGetOwner(lv_target)].lv_activeVehicle != null)) {
libNtve_gf_CreateUnitsWithDefaultFacing(1, lv_typeofCopiedUnit, 0, lv_abathurPlayer, UnitTypePlacementFromPoint(lv_typeofCopiedUnit, lv_abathurPlayer, UnitGetPosition(libGame_gv_players[lv_ownerofTarget].lv_activeVehicle), 35.0), lv_abathur);
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:5174
}
else {
libNtve_gf_CreateUnitsWithDefaultFacing(1, lv_typeofCopiedUnit, 0, lv_abathurPlayer, UnitTypePlacementFromPoint(lv_typeofCopiedUnit, lv_abathurPlayer, UnitGetPosition(lv_target), 35.0), lv_abathur);
}
lv_ultimateEvolutionUnit = UnitLastCreated();
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:6663
}
UnitIssueOrder(lv_unit, OrderTargetingPoint(AbilityCommand("move", 0), UnitTypePlacementFromPoint("AnubarakBeetleSpitBeetle", lv_player, UnitGetPosition(lv_unit), 20.0)), c_orderQueueAddToFront);
libNtve_gf_MakeUnitUncommandable(lv_unit, true);
while ((PointPathingPassable(UnitGetPosition(lv_unit)) == false)) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:6666
libNtve_gf_MakeUnitUncommandable(lv_unit, true);
while ((PointPathingPassable(UnitGetPosition(lv_unit)) == false)) {
UnitIssueOrder(lv_unit, OrderTargetingPoint(AbilityCommand("move", 0), UnitTypePlacementFromPoint("AnubarakBeetleSpitBeetle", lv_player, UnitGetPosition(lv_unit), 20.0)), c_orderQueueAddToFront);
Wait(0.0625, c_timeGame);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:6962
}
lv_newPoint = UnitTypePlacementFromPoint("AzmodanDemonicInvasionDemonGrunt", lv_player, EventPlayerEffectUsedPoint(c_effectLocationTargetPoint), 10.0);
UnitCreateEffectPoint(EventPlayerEffectUsedUnit(c_effectUnitCaster), "AzmodanDemonicInvasionStaggerPersistent", lv_newPoint);
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:14533
else {
}
lv_movePoint = PointWithOffsetPolar(UnitTypePlacementFromPoint(lv_vikingType, UnitGetOwner(EventUnit()), UnitGetPosition(lv_cairn), 3.0), DistanceBetweenPoints(UnitGetPosition(lv_cairn), UnitGetPosition(EventUnit())), (AngleBetweenPoints(UnitGetPosition(lv_cairn), UnitGetPosition(EventUnit())) + lv_offsetAngle));
libStEx_gf_MoveUnit(EventUnitCreatedUnit(), lv_movePoint, false);
libNtve_gf_MakeUnitFacePoint(EventUnitCreatedUnit(), UnitGetPosition(lv_cairn), 0.0);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:19111
}
else {
lv_targetPoint = UnitTypePlacementFromPoint(UnitGetType(lv_misha), lv_rexxarPlayer, lv_targetPoint, 500.0);
UnitCreateEffectPoint(lv_rexxar, "RexxarMishaFocusTargetSet", lv_targetPoint);
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:23522
}
UnitCreateEffectPoint(EventPlayerEffectUsedUnit(c_effectUnitCaster), "TinkerItsRainingScrapLaunchMissile", UnitTypePlacementFromPoint("TinkerSalvageScrap", lv_player, EventPlayerEffectUsedPoint(c_effectLocationTargetPoint), 5.0));
return true;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:25531
}
UnitCreateEffectPoint(EventPlayerEffectUsedUnit(c_effectUnitCaster), "InfestedDropLaunchTriggeredRoachSpawnMissile", UnitTypePlacementFromPoint(UnitGetType(EventPlayerEffectUsedUnit(c_effectUnitCaster)), UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)), EventPlayerEffectUsedPoint(c_effectLocationTargetPoint), 15.0));
return true;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:25789
lv_point = libNtve_gf_PointOffsetTowardsPoint(lv_point, 2.0, lv_unitPoint);
lv_newPoint = UnitTypePlacementFromPoint(UnitGetType(lv_unit), lv_player, lv_point, 5.0);
UnitCreateEffectPoint(lv_unit, "ZeratulSingularitySpikeSeekerInTheDarkTalentTeleport", lv_newPoint);
return true;
mods/heroesmapmods/battlegroundmapmods/braxisholdout.stormmod — base.stormdata/LibSCHO.galaxy:2511
// Variable Initialization
lv_pathablePoint = UnitTypePlacementFromPoint("ZergUltralisk", lp_dropPodOwner, lp_dropPodPosition, lv_pathablePointSearchRadius_C);
// Implementation
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:3495
if ((UnitGetType(UnitGroupLoopCurrent()) != "ZergDropPodLarge") && (UnitGroupLoopCurrent() != UnitLastCreated())) {
if (((UnitGetOwner(UnitGroupLoopCurrent()) == lp_player) || (libNtve_gf_PlayerIsEnemy(lp_player, UnitGetOwner(UnitGroupLoopCurrent()), libNtve_ge_PlayerRelation_Ally) == true))) {
UnitSetPosition(UnitGroupLoopCurrent(), UnitTypePlacementFromPoint(lp_buildingType, UnitGetOwner(UnitGroupLoopCurrent()), lp_landingPoint, 4.0), true);
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:4755
// Implementation
lv_placementTarget = UnitTypePlacementFromPoint("FenixDragoon", lp_player, lp_targetPoint, 500.0);
VisRevealArea(lp_player, RegionCircle(lv_placementTarget, 10.0), 5.0, false);
Wait(4.0, c_timeGame);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:4758
VisRevealArea(lp_player, RegionCircle(lv_placementTarget, 10.0), 5.0, false);
Wait(4.0, c_timeGame);
lv_placementTarget = UnitTypePlacementFromPoint("FenixDragoon", lp_player, lp_targetPoint, 500.0);
lv_cooldown = PlayerGetCooldown(lp_player, lv_cooldownLink);
libNtve_gf_PlayerRemoveCooldown(lp_player, lv_cooldownLink);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6793
lv_maxWalkingDistance = UserDataGetFixed("CoopTechZeratulArtifactPlacement", lv_artifactPlacementData, "maxWalkingDistance", lv_artifactIndex);
lv_checkPathing = (UserDataGetInt("CoopTechZeratulArtifactPlacement", lv_artifactPlacementData, "checkPathing", lv_artifactIndex) != 0);
lv_pathingCheckPoint = UnitTypePlacementFromPoint("ZeratulCoop", libCOMI_gv_cM_ZeratulPlayer, lv_artifactOrigin, 500.0);
lv_nearbyUnitHealthLimit = UserDataGetFixed("CoopTechZeratulArtifactPlacement", lv_artifactPlacementData, "maxNearbyHealth", lv_artifactIndex);
lv_zeratulSearchRadius = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "ProphecyArtifactRevealSearch", "AreaArray[" + IntToString(0) + "].Radius", c_playerAny);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6839
if ((lv_validPointsCount == 0)) {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_COMI_37E803EE"), true);
return UnitTypePlacementFromPoint("ZeratulArtifactPickup1", libCOMI_gv_cM_ZeratulPlayer, lv_artifactOrigin, 500.0);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6887
lv_maxWalkingDistance = UserDataGetFixed("CoopTechZeratulArtifactPlacement", lv_artifactPlacementData, "maxWalkingDistance", lv_artifactIndex);
lv_checkPathing = (UserDataGetInt("CoopTechZeratulArtifactPlacement", lv_artifactPlacementData, "checkPathing", lv_artifactIndex) != 0);
lv_pathingCheckPoint = UnitTypePlacementFromPoint("ZeratulCoop", libCOMI_gv_cM_ZeratulPlayer, lv_artifactOrigin, 500.0);
lv_nearbyUnitHealthLimit = UserDataGetFixed("CoopTechZeratulArtifactPlacement", lv_artifactPlacementData, "maxNearbyHealth", lv_artifactIndex);
lv_zeratulSearchRadius = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "ProphecyArtifactRevealSearch", "AreaArray[" + IntToString(0) + "].Radius", c_playerAny);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6945
if ((lv_validPointsCount == 0)) {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_COMI_97B1CE4C"), true);
return UnitTypePlacementFromPoint("ZeratulArtifactPickup1", libCOMI_gv_cM_ZeratulPlayer, lv_artifactOrigin, 0.0);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:11302
if ((UnitGetType(auto5CF01D86_var) != "ZergDropPodLarge") && (auto5CF01D86_var != UnitLastCreated())) {
if (((UnitGetOwner(auto5CF01D86_var) == lp_player) || (libNtve_gf_PlayerIsEnemy(lp_player, UnitGetOwner(auto5CF01D86_var), libNtve_ge_PlayerRelation_Ally) == true))) {
UnitSetPosition(auto5CF01D86_var, UnitTypePlacementFromPoint(lp_buildingType, UnitGetOwner(auto5CF01D86_var), lp_landingPoint, 4.0), true);
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:23142
}
else {
lv_placementtestpoint = UnitTypePlacementFromPoint(UnitGetType(auto33602D3D_var), UnitGetOwner(auto33602D3D_var), lv_unloadPoint, 5.0);
if ((lv_placementtestpoint != null)) {
UnitSetPosition(auto33602D3D_var, lv_placementtestpoint, false);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:25872
}
else {
lv_placementtestpoint = UnitTypePlacementFromPoint(UnitGetType(auto7BF82D02_var), UnitGetOwner(auto7BF82D02_var), lv_unloadPoint, 5.0);
if ((lv_placementtestpoint != null)) {
UnitSetPosition(auto7BF82D02_var, lv_placementtestpoint, false);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:27203
lv_fallbackexitpoint = UnitTypePlacementFromUnit(UnitGetType(autoF8BB9D10_var), UnitGetOwner(autoF8BB9D10_var), lv_voidseeker, 10.0);
if ((lv_fallbackexitpoint == null)) {
lv_fallbackexitpoint = UnitTypePlacementFromPoint(UnitGetType(autoF8BB9D10_var), UnitGetOwner(autoF8BB9D10_var), PlayerStartLocation(UnitGetOwner(lv_voidseeker)), 10.0);
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:984
if ((UnitGetType(autoEFB1326A_var) != "ZergDropPodLarge") && (autoEFB1326A_var != UnitLastCreated())) {
if (((UnitGetOwner(autoEFB1326A_var) == lp_player) || (libNtve_gf_PlayerIsEnemy(lp_player, UnitGetOwner(autoEFB1326A_var), libNtve_ge_PlayerRelation_Ally) == true))) {
UnitSetPosition(autoEFB1326A_var, UnitTypePlacementFromPoint(lp_buildingType, UnitGetOwner(autoEFB1326A_var), lp_landingPoint, 4.0), true);
}
else {
mods/warcoop/progression/equipments.sc2mod — base.sc2data/LibPEqu.galaxy:68
UnitModifyCooldown(lv_attacker, "Artifact/ArtifactHeroAttackTeleport", 10.0, c_cooldownOperationSet);
UnitSetPosition(lv_attacker, UnitTypePlacementFromPoint(UnitGetType(lv_attacker), lv_attackingowner, UnitGetPosition(lv_defender), 10.0), false);
ActorCreate(ActorScopeFromUnit(lv_attacker), "RemoveUnitTeleportVisual", null, null, null);
return true;
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:309
lv_worker = UnitGroupUnitFromEnd(autoCE2B86A9_g, autoCE2B86A9_u);
if (lv_worker == null) { break; }
lv_placement = UnitTypePlacementFromPoint(UnitGetType(lv_worker), lv_p, lv_creationOffset, 20.0);
UnitSetPosition(lv_worker, lv_placement, false);
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:2262
lv_worker = UnitGroupUnitFromEnd(autoE06D96B7_g, autoE06D96B7_u);
if (lv_worker == null) { break; }
lv_placement = UnitTypePlacementFromPoint(UnitGetType(lv_worker), lv_player, lv_creationOffset, 10.0);
UnitSetPosition(lv_worker, lv_placement, false);
}