# Revive Unit
Grammar — Revive u
Flags —Native
|Action
Revives the specified unit.
# Arguments
unit
— Unit
Returns — void
native void UnitRevive(unit inUnit);
# Related
Category: Unit / Basic
- Unit Show Kill Display —
void
— UnitShowKillDisplay - Unit Can Path To Point —
bool
— UnitPathableToPoint - Unit Can Path To Unit —
bool
— UnitPathableToUnit - Create Units With Default Facing —
void
— libNtve_gf_CreateUnitsWithDefaultFacing - Create Units With Point Facing —
void
— libNtve_gf_CreateUnitsAtPoint2 - Create Units Facing Angle —
unitgroup
— UnitCreate - Create Units Facing Point —
unitgroup
— libNtve_gf_UnitCreateFacingPoint - Last Created Unit —
unit
— UnitLastCreated - Last Created Units —
unitgroup
— UnitLastCreatedGroup - Original Caster Of Unit —
unit
— UnitGetOriginalCaster - Effect That Created Unit —
string
<gamelink::Effect> — UnitGetOriginalEffect - Replace Unit —
void
— libNtve_gf_ReplaceUnit - Last Replaced Unit —
unit
— libNtve_gf_LastReplacedUnit - Change Owner —
void
— UnitSetOwner - Unit Owner Changes —
void
— TriggerAddEventUnitChangeOwner - Old Unit Owner —
int
— EventUnitOwnerOld - New Unit Owner —
int
— EventUnitOwnerNew - Rescue Unit —
void
— libNtve_gf_RescueUnit - Rescue Unit Group —
void
— libNtve_gf_RescueUnit2 - Kill Unit —
void
— UnitKill - Revive Unit —
void
— UnitRevive - Remove Unit —
void
— UnitRemove - Owner Of Unit —
int
— UnitGetOwner - Unit Is Alive —
bool
— UnitIsAlive - Unit Is Valid —
bool
— UnitIsValid - Unit Group Is Dead —
bool
— libNtve_gf_UnitGroupIsDead - Move Unit Instantly —
void
— UnitSetPosition - Make Unit Face Angle —
void
— UnitSetFacing - Make Unit Face Point —
void
— libNtve_gf_MakeUnitFacePoint - Position Of Unit —
point
— UnitGetPosition - Goal Position Of Unit —
point
— UnitGetGoalPosition - Facing Angle Of Unit —
fixed
— UnitGetFacing - Pause/Unpause Unit —
void
— libNtve_gf_PauseUnit - Pause/Unpause All Units —
void
— UnitPauseAll - Sleep/WakeUp Unit —
void
— libNtve_gf_SleepUnit - Show/Hide Unit —
void
— libNtve_gf_ShowHideUnit - Share Vision of Unit —
void
— libNtve_gf_ShareVisionofUnit - Unit Is Paused —
bool
— libNtve_gf_UnitIsPaused - Unit Is Sleepiing —
bool
— libNtve_gf_UnitIsSleepiing - Unit Is Hidden —
bool
— libNtve_gf_UnitIsHidden - Unit Is Visible To Player —
bool
— libNtve_gf_UnitIsVisibleToPlayer - Set Unit Custom Value —
void
— UnitSetCustomValue - Custom Value Of Unit —
fixed
— UnitGetCustomValue - Unit Enters/Leaves Region —
void
— TriggerAddEventUnitRegion - Triggering Region —
region
— EventUnitRegion - Unit Enters/Leaves Point —
void
— TriggerAddEventUnitRangePoint - Unit Enters/Leaves Range Of Unit —
void
— TriggerAddEventUnitRange - Triggering Range Unit —
unit
— EventUnitRangeUnit - Unit In Region —
bool
— libNtve_gf_UnitInRegion - Triggering Unit —
unit
— EventUnit - Load Unit Model —
void
— UnitLoadModel - Unload Unit Model —
void
— UnitUnloadModel - Agent Of Player For Unit —
unit
— UnitAgent - Change Empty Unit Variables In Events —
void
— UnitEventSetNullVariableInvalid - Name of Unit —
text
— UnitGetName - Ideal Harvester Count —
int
— UnitIdealWorkerCount - Current Harvester Count —
int
— UnitCurrentWorkerCount
# Examples
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pcampaigntest.sc2map/MapScript.galaxy:347
}
else {
UnitRevive(lv_hybrid);
if ((UnitIsAlive(lv_hybrid) == false)) {
UnitCreate(1, "HybridReaver", 0, gv_pLAYER_02_DOMINION, UnitGetPosition(lp_phylactery), 270.0);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pcampaigntest.sc2map — MapScript.galaxy:347
}
else {
UnitRevive(lv_hybrid);
if ((UnitIsAlive(lv_hybrid) == false)) {
UnitCreate(1, "HybridReaver", 0, gv_pLAYER_02_DOMINION, UnitGetPosition(lp_phylactery), 270.0);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:1837
UnitBehaviorRemove(lp_viking, "DeadMechanics", 1);
UnitBehaviorRemove(lp_viking, "LostVikingsVikingDowned", 1);
UnitRevive(lp_viking);
UnitSetPropertyFixed(lp_viking, c_unitPropLifePercent, 100.0);
libNtve_gf_SendActorMessageToUnit(lp_viking, "Signal Respawn");
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:6841
UnitBehaviorRemove(lv_heroUnit, "Dead", 1);
UnitBehaviorRemove(lv_heroUnit, "DeadMechanics", 1);
UnitRevive(lv_heroUnit);
UnitSetState(lv_heroUnit, c_unitStateStatusBar, true);
UnitSetPropertyFixed(lv_heroUnit, c_unitPropLifePercent, lp_reSpawnHealthPercent);
mods/heromods/dva.stormmod — base.stormdata/LibHDVA.galaxy:310
UnitBehaviorRemove(lv_dVaPilotUnit, "DeadMechanics", 1);
UnitBehaviorRemove(lv_dVaMechUnit, "HeroGenericMapMechanicPickupDisallowed", 1);
UnitRevive(lv_dVaPilotUnit);
libNtve_gf_ShowHideUnit(lv_dVaPilotUnit, true);
UnitPutInTransport(lv_dVaPilotUnit, lv_dVaMechUnit);
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:2567
}
UnitRevive(libNCMI_gv_nM_HeroRevivingUnit[(lv_heroType)]);
autoEC0FE33E_val = lv_heroType;
if (autoEC0FE33E_val == libNCMI_ge_NM_HeroType_NM_HeroType_Nova) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:8121
Wait(0.125, c_timeGame);
if ((UnitIsAlive(libCOMI_gv_cM_HeroUnit[lp_player]) == false)) {
UnitRevive(libCOMI_gv_cM_HeroUnit[lp_player]);
UnitCreateEffectUnit(libCOMI_gv_cM_HeroUnit[lp_player], libCOMI_gv_cM_HeroReviveHealEffect, libCOMI_gv_cM_HeroUnit[lp_player]);
if ((RegionContainsPoint(RegionPlayableMap(), lv_reviveFallbackPoint) == true)) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:25271
libNtve_gf_PlayerRemoveCooldown(lv_p, libCOOC_gf_CC_CommanderHeroReviveLink(libCOOC_gf_ActiveCommanderForPlayer(lv_p)));
UnitRevive(libCOMI_gv_cM_HeroUnit[lv_p]);
UnitSetPropertyFixed(libCOMI_gv_cM_HeroUnit[lv_p], c_unitPropLifePercent, 100.0);
UnitCreateEffectPoint(libCOMI_gv_cM_HeroUnit[lv_p], libCOMI_gv_cM_Tychus_OdinSummonEffect_Called, EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:26068
if ((UnitIsValid(lv_reviveTarget) == true)) {
UnitSetPosition(lv_reviveTarget, UnitGetPosition(lv_fakeUnit), false);
UnitRevive(lv_reviveTarget);
UnitSetPropertyFixed(lv_reviveTarget, c_unitPropLifePercent, 100.0);
}