# Find Placement From Unit For Unit Type
Grammar — Find Placement From source Unit For Unit Type unitType And Player player With Range range
Flags —Native
|Function
# Arguments
string
<gamelink::Unit> — Unit Typeint
— Playerunit
— Sourcefixed
— Range
Returns — point
native point UnitTypePlacementFromUnit(
string inType,
int inPlayer,
unit 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
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:27201
autoF8BB9D10_var = UnitGroupUnitFromEnd(autoF8BB9D10_g, autoF8BB9D10_u);
if (autoF8BB9D10_var == null) { break; }
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/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:27617
if ((UnitIsAlive(libCOMI_gv_cM_ZeratulProphecyArtifact) == true) && (PathingType(UnitGetPosition(libCOMI_gv_cM_ZeratulProphecyArtifact)) != c_pathingGround)) {
UnitSetPosition(libCOMI_gv_cM_ZeratulProphecyArtifact, UnitTypePlacementFromUnit("ZeratulCoop", UnitGetOwner(libCOMI_gv_cM_ZeratulProphecyArtifact), libCOMI_gv_cM_ZeratulProphecyArtifact, 10.0), true);
}