# Create Units With Point Facing
Grammar — Create count|Number type|Unit for player player at p using point facing (flags)
Flags —Action
Creates units using the facing angle of a point. Use the “Last Created Unit” and “Last Created Units” functions to refer to the created units.
# Arguments
int
— Countstring
[ gamelink::Unit ] — Typeint
[ preset::Unit_Create_Style2 ] — Flagsint
— Playerpoint
— Point
Returns — void
void libNtve_gf_CreateUnitsAtPoint2(
int lp_count,
string lp_type,
int lp_flags,
int lp_player,
point lp_p,
);
# Related
Category: Unit / Basic
- [F] —
void
— Unit Show Kill Display — ( UnitShowKillDisplay ) - [F] —
bool
— Unit Can Path To Point — ( UnitPathableToPoint ) - [F] —
bool
— Unit Can Path To Unit — ( UnitPathableToUnit ) - [F] —
void
— Create Units With Default Facing — ( libNtve_gf_CreateUnitsWithDefaultFacing ) - [F] —
void
— Create Units With Point Facing — ( libNtve_gf_CreateUnitsAtPoint2 ) - [F] —
unitgroup
— Create Units Facing Angle — ( UnitCreate ) - [F] —
unitgroup
— Create Units Facing Point — ( libNtve_gf_UnitCreateFacingPoint ) - [F] —
unit
— Last Created Unit — ( UnitLastCreated ) - [F] —
unitgroup
— Last Created Units — ( UnitLastCreatedGroup ) - [F] —
unit
— Original Caster Of Unit — ( UnitGetOriginalCaster ) - [F] —
string
[ gamelink::Effect ] — Effect That Created Unit — ( UnitGetOriginalEffect ) - [F] —
void
— Replace Unit — ( libNtve_gf_ReplaceUnit ) - [F] —
unit
— Last Replaced Unit — ( libNtve_gf_LastReplacedUnit ) - [F] —
void
— Change Owner — ( UnitSetOwner ) - [F] —
void
— Unit Owner Changes — ( TriggerAddEventUnitChangeOwner ) - [F] —
int
— Old Unit Owner — ( EventUnitOwnerOld ) - [F] —
int
— New Unit Owner — ( EventUnitOwnerNew ) - [F] —
void
— Rescue Unit — ( libNtve_gf_RescueUnit ) - [F] —
void
— Rescue Unit Group — ( libNtve_gf_RescueUnit2 ) - [F] —
void
— Kill Unit — ( UnitKill ) - [F] —
void
— Revive Unit — ( UnitRevive ) - [F] —
void
— Remove Unit — ( UnitRemove ) - [F] —
int
— Owner Of Unit — ( UnitGetOwner ) - [F] —
bool
— Unit Is Alive — ( UnitIsAlive ) - [F] —
bool
— Unit Is Valid — ( UnitIsValid ) - [F] —
bool
— Unit Group Is Dead — ( libNtve_gf_UnitGroupIsDead ) - [F] —
void
— Move Unit Instantly — ( UnitSetPosition ) - [F] —
void
— Make Unit Face Angle — ( UnitSetFacing ) - [F] —
void
— Make Unit Face Point — ( libNtve_gf_MakeUnitFacePoint ) - [F] —
point
— Position Of Unit — ( UnitGetPosition ) - [F] —
point
— Goal Position Of Unit — ( UnitGetGoalPosition ) - [F] —
fixed
— Facing Angle Of Unit — ( UnitGetFacing ) - [F] —
void
— Pause/Unpause Unit — ( libNtve_gf_PauseUnit ) - [F] —
void
— Pause/Unpause All Units — ( UnitPauseAll ) - [F] —
void
— Sleep/WakeUp Unit — ( libNtve_gf_SleepUnit ) - [F] —
void
— Show/Hide Unit — ( libNtve_gf_ShowHideUnit ) - [F] —
void
— Share Vision of Unit — ( libNtve_gf_ShareVisionofUnit ) - [F] —
bool
— Unit Is Paused — ( libNtve_gf_UnitIsPaused ) - [F] —
bool
— Unit Is Sleepiing — ( libNtve_gf_UnitIsSleepiing ) - [F] —
bool
— Unit Is Hidden — ( libNtve_gf_UnitIsHidden ) - [F] —
bool
— Unit Is Visible To Player — ( libNtve_gf_UnitIsVisibleToPlayer ) - [F] —
void
— Set Unit Custom Value — ( UnitSetCustomValue ) - [F] —
fixed
— Custom Value Of Unit — ( UnitGetCustomValue ) - [F] —
void
— Unit Enters/Leaves Region — ( TriggerAddEventUnitRegion ) - [F] —
region
— Triggering Region — ( EventUnitRegion ) - [F] —
void
— Unit Enters/Leaves Point — ( TriggerAddEventUnitRangePoint ) - [F] —
void
— Unit Enters/Leaves Range Of Unit — ( TriggerAddEventUnitRange ) - [F] —
unit
— Triggering Range Unit — ( EventUnitRangeUnit ) - [F] —
bool
— Unit In Region — ( libNtve_gf_UnitInRegion ) - [F] —
unit
— Triggering Unit — ( EventUnit ) - [F] —
void
— Load Unit Model — ( UnitLoadModel ) - [F] —
void
— Unload Unit Model — ( UnitUnloadModel ) - [F] —
unit
— Agent Of Player For Unit — ( UnitAgent ) - [F] —
void
— Change Empty Unit Variables In Events — ( UnitEventSetNullVariableInvalid ) - [F] —
text
— Name of Unit — ( UnitGetName ) - [F] —
int
— Ideal Harvester Count — ( UnitIdealWorkerCount ) - [F] —
int
— Current Harvester Count — ( UnitCurrentWorkerCount )
# Examples
# campaigns/liberty.sc2campaign
// L242
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER1, RegionGetCenter(lp_location))
// L259
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER1, RegionGetCenter(lp_location))
// L276
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER2, RegionGetCenter(lp_location))
// L294
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER1, RegionGetCenter(lp_location))
// L350
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_USER, RegionGetCenter(lp_location))
// L366
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_USER, RegionGetCenter(lp_location))
// L387
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_USER, RegionGetCenter(lp_location))
// L877
libNtve_gf_CreateUnitsAtPoint2(1, "Zergling", 0, gv_pLAYER_COMPUTER1, RegionGetCenter(RegionFromId(1)))
// L674
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(4))
// L675
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(5))
// L676
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(6))
// L677
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(7))
// L678
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(8))
// L679
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(9))
// L718
libNtve_gf_CreateUnitsAtPoint2(6, "Zergling", 0, gv_pLAYER_ENEMY, PointFromId(29))
// L727
libNtve_gf_CreateUnitsAtPoint2(6, "Zergling", 0, gv_pLAYER_ENEMY, PointFromId(29))
// L729
libNtve_gf_CreateUnitsAtPoint2(2, "Roach", 0, gv_pLAYER_ENEMY, PointFromId(29))
// L734
libNtve_gf_CreateUnitsAtPoint2(6, "Roach", 0, gv_pLAYER_ENEMY, PointFromId(29))
// L562
libNtve_gf_CreateUnitsAtPoint2(6, "Zergling", 0, gv_p2_ENEMY_ZERG, PointFromId(53))
// L566
libNtve_gf_CreateUnitsAtPoint2(2, "Zergling", 0, gv_p2_ENEMY_ZERG, PointFromId(53))
// L570
libNtve_gf_CreateUnitsAtPoint2(2, "Zergling", 0, gv_p2_ENEMY_ZERG, PointFromId(53))
// L574
libNtve_gf_CreateUnitsAtPoint2(4, "Zergling", 0, gv_p2_ENEMY_ZERG, PointFromId(53))
// L578
libNtve_gf_CreateUnitsAtPoint2(8, "Zergling", 0, gv_p2_ENEMY_ZERG, PointFromId(53))
// L1402
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(14))
// L1403
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(15))
// L1404
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(16))
// L1405
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(17))
// L1406
libNtve_gf_CreateUnitsAtPoint2(1, "SCV", 0, gv_pLAYER_USER, PointFromId(18))
// L232
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER1, RegionGetCenter(lp_location))
// L248
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER1, RegionGetCenter(lp_location))
// L264
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER1, RegionGetCenter(lp_location))
// L319
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_USER, RegionGetCenter(lp_location))
// L335
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_USER, RegionGetCenter(lp_location))
// L351
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_USER, RegionGetCenter(lp_location))
// L240
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER1, RegionGetCenter(lp_location))
// L256
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER1, RegionGetCenter(lp_location))
// L272
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_COMPUTER1, RegionGetCenter(lp_location))
// L349
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_USER, RegionGetCenter(lp_location))
// L365
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_USER, RegionGetCenter(lp_location))
// L381
libNtve_gf_CreateUnitsAtPoint2(1, lp_type, 0, gv_pLAYER_USER, RegionGetCenter(lp_location))
// L3165
libNtve_gf_CreateUnitsAtPoint2(1, "SS_Fighter", 0, gv_p1_USER, RegionGetCenter(RegionEntireMap()))
// L4710
libNtve_gf_CreateUnitsAtPoint2(1, "SS_CarrierBoss", 0, gv_p2_ENEMY, lv_spawnLoc)
// L5215
libNtve_gf_CreateUnitsAtPoint2(1, "SS_Leviathan", 0, gv_p0_NEUTRAL, lv_spawnLoc)
// L5666
libNtve_gf_CreateUnitsAtPoint2(1, "SS_TerraTron", 0, gv_p0_NEUTRAL, lv_spawnLoc)
// L7120
libNtve_gf_CreateUnitsAtPoint2(1, "SS_Boss", 0, gv_p2_ENEMY, lv_spawnLoc)
// L373
libNtve_gf_CreateUnitsAtPoint2(1, "Overlord", 0, gv_p5_ZERG_TACTICALPHASE, lp_param_Spawn)
// L424
libNtve_gf_CreateUnitsAtPoint2(lp_qty, lp_type, 0, lp_player, lp_loc)
// L1133
libNtve_gf_CreateUnitsAtPoint2(1, "Marine", 0, gv_p4_COLONISTS, PointFromId(2079))
// L1322
libNtve_gf_CreateUnitsAtPoint2(1, "CivilianFemale", 0, 0, PointFromId(86))
// L1403
libNtve_gf_CreateUnitsAtPoint2(1, "ZerglingBurrowed", 0, gv_p5_ZERG_TACTICALPHASE, PointFromId(2425))
// L3520
libNtve_gf_CreateUnitsAtPoint2(1, "CreepTumor", c_unitCreateConstruct, gv_p5_ZERG_TACTICALPHASE, lv_point)
// L3622
libNtve_gf_CreateUnitsAtPoint2(1, "NydusCanal", 0, gv_p2_ZERG_ORANGE_NW, lv_point)
// L3636
libNtve_gf_CreateUnitsAtPoint2(lv_packSize, lv_type, 0, gv_p2_ZERG_ORANGE_NW, UnitGetPosition(lv_nydusWorm))
// L4393
libNtve_gf_CreateUnitsAtPoint2(gv_doomsdayZergSpawnCount, "Mutalisk", 0, gv_p3_ZERG_LIGHTBLUE_SE, PointFromId(59))
// L4395
libNtve_gf_CreateUnitsAtPoint2(gv_doomsdayZergSpawnCount, "Mutalisk", 0, gv_p3_ZERG_LIGHTBLUE_SE, PointFromId(223))
// L336
libNtve_gf_CreateUnitsAtPoint2(libNtve_gf_DifficultyValueInt(3, 4, 5, 6), "InfestedCivilian", 0, gv_pLAYER_04_INFESTEDREFUGEES, UnitGetPosition(lp_attackedStructure))
// L340
libNtve_gf_CreateUnitsAtPoint2(libNtve_gf_DifficultyValueInt(2, 2, 3, 4), "InfestedTerranCampaign", 0, gv_pLAYER_04_INFESTEDREFUGEES, UnitGetPosition(lp_attackedStructure))
// L344
libNtve_gf_CreateUnitsAtPoint2(libNtve_gf_DifficultyValueInt(2, 3, 4, 5), "InfestedTerranCampaign", 0, gv_pLAYER_04_INFESTEDREFUGEES, UnitGetPosition(lp_attackedStructure))
// L348
libNtve_gf_CreateUnitsAtPoint2(libNtve_gf_DifficultyValueInt(3, 4, 2, 3), "InfestedTerranCampaign", 0, gv_pLAYER_04_INFESTEDREFUGEES, UnitGetPosition(lp_attackedStructure))
// L350
libNtve_gf_CreateUnitsAtPoint2(libNtve_gf_DifficultyValueInt(0, 0, 1, 1), "InfestedAbomination", 0, gv_pLAYER_04_INFESTEDREFUGEES, UnitGetPosition(lp_attackedStructure))
// L894
libNtve_gf_CreateUnitsAtPoint2(14, "InfestedCivilian", 0, gv_pLAYER_03_INFESTED_REFUGEES, RegionGetCenter(RegionFromId(3)))
// L897
libNtve_gf_CreateUnitsAtPoint2(14, "InfestedCivilian", 0, gv_pLAYER_03_INFESTED_REFUGEES, RegionGetCenter(RegionFromId(4)))
// L1763
libNtve_gf_CreateUnitsAtPoint2(1, "InfestedTerranCampaign", 0, gv_pLAYER_04_INFESTEDREFUGEES, UnitGetPosition(lv_pickedSpawner))
// L1776
libNtve_gf_CreateUnitsAtPoint2(1, "InfestedCivilian", 0, gv_pLAYER_04_INFESTEDREFUGEES, UnitGetPosition(lv_pickedSpawner))
// L2612
libNtve_gf_CreateUnitsAtPoint2(libNtve_gf_DifficultyValueInt(4, 4, 3, 3), "Hellion", 0, gv_pLAYER_08_SWANN, PointFromId(1385))
// L2961
libNtve_gf_CreateUnitsAtPoint2(1, "Colonist", 0, gv_pLAYER03_COLONIST, lv_pickedPoint)
// L2967
libNtve_gf_CreateUnitsAtPoint2(1, "ColonistFemale", 0, gv_pLAYER03_COLONIST, lv_pickedPoint)
// L3040
libNtve_gf_CreateUnitsAtPoint2(1, "Colonist", 0, gv_pLAYER03_COLONIST, lv_pickedPoint)
// L3046
libNtve_gf_CreateUnitsAtPoint2(1, "ColonistFemale", 0, gv_pLAYER03_COLONIST, lv_pickedPoint)
// L3116
libNtve_gf_CreateUnitsAtPoint2(1, "Colonist", 0, gv_pLAYER03_COLONIST, lv_pickedPoint)
// L3122
libNtve_gf_CreateUnitsAtPoint2(1, "ColonistFemale", 0, gv_pLAYER03_COLONIST, lv_pickedPoint)
// L5984
libNtve_gf_CreateUnitsAtPoint2(1, "Purifier", 0, gv_pLAYER04_PURIFIER, PointFromId(2363))
// L5989
libNtve_gf_CreateUnitsAtPoint2(1, "Biodome", 0, gv_pLAYER03_COLONIST, PointFromId(2367))
// L5993
libNtve_gf_CreateUnitsAtPoint2(1, "Hut", 0, gv_pLAYER05_COLONISTSTRUCTURES, PointFromId(2368))
// L5995
libNtve_gf_CreateUnitsAtPoint2(1, "Hut", 0, gv_pLAYER05_COLONISTSTRUCTURES, PointFromId(2369))
// L3976
libNtve_gf_CreateUnitsAtPoint2(1, "Zergling", 0, gv_p08_ZERG_SOUTH, PointFromId(1073))
// L3978
libNtve_gf_CreateUnitsAtPoint2(1, "Feederling", 0, gv_p08_ZERG_SOUTH, PointFromId(1073))
// L4210
libNtve_gf_CreateUnitsAtPoint2(1, "VikingFighter", 0, gv_p01_USER, PointFromId(468))
// L4212
libNtve_gf_CreateUnitsAtPoint2(1, "VikingFighter", 0, gv_p01_USER, PointFromId(469))
// L4214
libNtve_gf_CreateUnitsAtPoint2(1, "VikingFighter", 0, gv_p01_USER, PointFromId(471))
// L570
libNtve_gf_CreateUnitsAtPoint2(1, "TarsonisEngine", 0, gv_pLAYER_06_TRAIN, lv_currentPoint)
// L595
libNtve_gf_CreateUnitsAtPoint2(1, "Caboose", 0, gv_pLAYER_06_TRAIN, lv_currentPoint)
// L598
libNtve_gf_CreateUnitsAtPoint2(1, "FreightCar", 0, gv_pLAYER_06_TRAIN, lv_currentPoint)
// L1920
libNtve_gf_CreateUnitsAtPoint2(1, lv_trainCarType, 0, gv_pLAYER_06_TRAIN, lv_spawnLocation)
// L2058
libNtve_gf_CreateUnitsAtPoint2(1, gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_unitType, 0, lv_escortPlayer, lv_escortSpawnPoint)
// L1550
libNtve_gf_CreateUnitsAtPoint2(1, "Medivac", 0, gv_p03_MIRA_HAN, PointFromId(1242))
// L3151
libNtve_gf_CreateUnitsAtPoint2(1, "Raven", 0, gv_p02_ORLAN_ENEMY, PointFromId(784))
// L3208
libNtve_gf_CreateUnitsAtPoint2(1, "Raven", 0, gv_p02_ORLAN_ENEMY, PointFromId(784))
// L3265
libNtve_gf_CreateUnitsAtPoint2(1, "Raven", 0, gv_p02_ORLAN_ENEMY, PointFromId(785))
// L3322
libNtve_gf_CreateUnitsAtPoint2(1, "Raven", 0, gv_p02_ORLAN_ENEMY, PointFromId(805))
// L5181
libNtve_gf_CreateUnitsAtPoint2(5, "Marine", 0, gv_p02_ORLAN_ENEMY, PointFromId(629))
// L5187
libNtve_gf_CreateUnitsAtPoint2(3, "Goliath", 0, gv_p02_ORLAN_ENEMY, PointFromId(629))
// L5200
libNtve_gf_CreateUnitsAtPoint2(5, "Marine", 0, gv_p02_ORLAN_ENEMY, PointFromId(629))
// L5280
libNtve_gf_CreateUnitsAtPoint2(1, "Vulture", 0, gv_p01_USER, PointFromId(1522))
// L5729
libNtve_gf_CreateUnitsAtPoint2(1, "Vulture", 0, gv_p01_USER, RegionRandomPoint(RegionFromId(26)))
// L1434
libNtve_gf_CreateUnitsAtPoint2(1, "Battlecruiser", 0, gv_p07_DOMINION_STARPORT_B, PointFromId(712))
// L1437
libNtve_gf_CreateUnitsAtPoint2(1, "Battlecruiser", 0, gv_p07_DOMINION_STARPORT_B, PointFromId(302))
// L5117
libNtve_gf_CreateUnitsAtPoint2(1, "TychusChaingun", 0, gv_p01_USER, PointFromId(967))
// L5119
libNtve_gf_CreateUnitsAtPoint2(1, "Marine", 0, gv_p01_USER, PointFromId(1348))
// L5120
libNtve_gf_CreateUnitsAtPoint2(1, "Marine", 0, gv_p01_USER, PointFromId(1353))