# Find Placement From Unit For Unit Type

Grammar — Find Placement From source Unit For Unit Type unitType And Player player With Range range
FlagsNative | Function

# Arguments

  • string<gamelink::Unit> — Unit Type
  • int — Player
  • unit — Source
  • fixed — Range

Returns — point

native point UnitTypePlacementFromUnit(
	string inType,
	int inPlayer,
	unit inSource,
	fixed inRange,
);

Category: Unit / Placement

# Examples

mods/starcoop/starcoop.sc2modbase.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.sc2modbase.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);
    }