# Find Placement From Point For Unit Type With Tests

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

# Arguments

  • string<gamelink::Unit> — Unit Type
  • int — Player
  • point — Source
  • fixed — Range
  • int<preset::PlacementTests> — Tests

Returns — point

native point UnitTypePlacementTestsFromPoint(
	string inType,
	int inPlayer,
	point inSource,
	fixed inRange,
	int inTests,
);

Category: Unit / Placement

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3198

                lv_createPosition = AIGetBuildingPlacement(lp_player, UnitGroupCenterOfGroup(UnitGroup(null, lp_player, RegionEntireMap(), UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0)), lv_unitToCreate, -1);
                if ((lv_createPosition == null)) {
                    lv_createPosition = UnitTypePlacementTestsFromPoint(lv_unitToCreate, lp_player, UnitGroupCenterOfGroup(UnitGroup(null, lp_player, RegionEntireMap(), UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0)), 0.0, c_placementTestCreepMask | c_placementTestPowerMask | c_placementTestFogMask | c_placementTestIgnoreBlockersMask | c_placementTestIgnoreInvisibleMask | c_placementTestZoneMask | c_placementTestCliffMask | c_placementTestDensityMask);
                }
                else {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:14527


    libNtve_gf_ShowHideUnit(lv_cargoUnit, false);
    lv_landingPoint = UnitTypePlacementTestsFromPoint(UnitGetType(lv_cargoUnit), EventPlayer(), UnitGetPosition(lv_transportUnit), 3.0, c_placementTestCliffMask);
    if (((lv_landingPoint == null) || (PlayerGroupHasPlayer(libCOOC_gf_CommanderPlayers(), EventPlayer()) != true))) {
        UnitSetPropertyFixed(lv_cargoUnit, c_unitPropShields, 0.0);