# Unit Is Alive
Grammar — u is alive
Flags —Native
|Function
Returns true if a unit is alive.
# Arguments
unit
— Unit
Returns — bool
native bool UnitIsAlive(unit inUnit);
# 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
// L224
UnitIsAlive(gv_nWRocks)
// L840
UnitIsAlive(gv_boss)
// L1098
UnitIsAlive(lp_guardian)
// L1551
UnitIsAlive(lv_lightningProjector)
// L1558
UnitIsAlive(lv_lightningProjector)
// L1662
UnitIsAlive(lp_scienceVessel)
// L1716
UnitIsAlive(lp_battlecruiser)
// L1728
UnitIsAlive(lp_battlecruiser)
// L1732
UnitIsAlive(lp_battlecruiser)
// L1745
UnitIsAlive(lp_battlecruiser)
// L2345
UnitIsAlive(gv_missileSpinnerL)
// L327
UnitIsAlive(gv_tHEONETRUCK)
// L1019
UnitIsAlive(UnitFromId(290))
// L1335
UnitIsAlive(UnitLastCreated())
// L2439
UnitIsAlive(gv_pingConvoy)
// L3005
UnitIsAlive(gv_chrysalisPingUnit)
// L3634
UnitIsAlive(lv_nydusWorm)
// L316
UnitIsAlive(lp_u)
// L331
UnitIsAlive(lp_attackedStructure)
// L406
UnitIsAlive(UnitFromId(17))
// L414
UnitIsAlive(UnitFromId(17))
// L2010
UnitIsAlive(gv_infestableStructure[lv_index])
// L2792
UnitIsAlive(UnitFromId(17))
// L1281
UnitIsAlive(gv_purifier)
// L1289
UnitIsAlive(gv_purifier)
// L1301
UnitIsAlive(gv_purifier)
// L1307
UnitIsAlive(gv_purifier)
// L1318
UnitIsAlive(gv_purifier)
// L1327
UnitIsAlive(gv_purifier)
// L1381
UnitIsAlive(gv_purifier)
// L1389
UnitIsAlive(gv_purifier)
// L1401
UnitIsAlive(gv_purifier)
// L1428
UnitIsAlive(gv_purifier)
// L455
UnitIsAlive(UnitFromId(57))
// L459
UnitIsAlive(UnitFromId(68))
// L463
UnitIsAlive(UnitFromId(5))
// L588
UnitIsAlive(gv_infestationDefenderUnit[lp_colonyIndex][lp_defenderIndex])
// L635
UnitIsAlive(lv_drone)
// L660
UnitIsAlive(lp_cargo)
// L680
UnitIsAlive(lp_drone)
// L784
UnitIsAlive(lv_virophage)
// L2184
UnitIsAlive(lv_virophage)
// L2288
UnitIsAlive(gv_infestationVirophageUnit[lv_colonyIndex])
// L426
UnitIsAlive(lp_diamondback)
// L436
UnitIsAlive(lp_diamondback)
// L1886
UnitIsAlive(gv_trainList[lv_trainsToSpawn[lv_i]].lv_trainCars[1])
// L2071
UnitIsAlive(gv_trainList[lv_trainIndex].lv_trainCars[1])
// L2085
UnitIsAlive(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort)
// L2216
UnitIsAlive(gv_trainList[gv_trainBossBarIndex].lv_trainCars[1])
// L2433
UnitIsAlive(gv_trainList[gv_trainBossBarIndex].lv_trainCars[1])
// L2438
UnitIsAlive(gv_trainList[gv_trainBossBarIndex].lv_trainCars[1])
// L2515
UnitIsAlive(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort)
// L2531
UnitIsAlive(gv_trainList[lv_trainIndex].lv_trainCars[1])
// L356
UnitIsAlive(UnitFromId(1226))
// L3538
UnitIsAlive(UnitFromId(1226))
// L3751
UnitIsAlive(UnitFromId(327))
// L1294
UnitIsAlive(gv_odin)
// L1592
UnitIsAlive(gv_battlecruiser1)
// L1596
UnitIsAlive(gv_battlecruiser2)
// L1784
UnitIsAlive(gv_tippedDetectorUnit)
// L2710
UnitIsAlive(UnitFromId(503))
// L2718
UnitIsAlive(UnitFromId(503))
// L3142
UnitIsAlive(UnitFromId(2219))
// L3235
UnitIsAlive(gv_odin)
// L357
UnitIsAlive(lp_transport)
// L2110
UnitIsAlive(gv_odin)
// L2930
UnitIsAlive(UnitFromId(1078))
// L2982
UnitIsAlive(UnitFromId(191))
// L3033
UnitIsAlive(UnitFromId(1370))
// L3084
UnitIsAlive(UnitFromId(242))
// L3135
UnitIsAlive(UnitFromId(1364))
// L3186
UnitIsAlive(UnitFromId(926))
// L4569
UnitIsAlive(gv_odin)
// L4592
UnitIsAlive(gv_odin)
// L2765
UnitIsAlive(lv_scientist)
// L3708
UnitIsAlive(gv_turret01)
// L3712
UnitIsAlive(gv_turret02)
// L3716
UnitIsAlive(gv_turret03)
// L3720
UnitIsAlive(gv_turret04)
// L3724
UnitIsAlive(gv_turret05)
// L3728
UnitIsAlive(gv_turret06)
// L3758
UnitIsAlive(gv_turret01)
// L3762
UnitIsAlive(gv_turret02)
// L3766
UnitIsAlive(gv_turret03)
// L810
UnitIsAlive(gv_dogmeat)
// L863
UnitIsAlive(gv_dogmeat)
// L916
UnitIsAlive(gv_dogmeat)
// L1000
UnitIsAlive(gv_crazyOldClarice)
// L1034
UnitIsAlive(gv_dogmeat)
// L1136
UnitIsAlive(UnitFromId(59))
// L1904
UnitIsAlive(lv_speaker)
// L2077
UnitIsAlive(gv_southieSpeaker)
// L2299
UnitIsAlive(UnitFromId(331))
// L2656
UnitIsAlive(gv_holoboards[6])
// L314
UnitIsAlive(lp_unit)
// L327
UnitIsAlive(gv_medicBarracks)
// L2094
UnitIsAlive(lv_colonist)
// L2103
UnitIsAlive(lv_colonist)
// L2150
UnitIsAlive(lv_colonist)
// L2159
UnitIsAlive(lv_colonist)