# Rescue Unit
Grammar — Rescue unit for player player and changeColor|Change/Retain Color
Flags —Action
Causes a unit to be rescued, changing ownership and changing or retaining its color.
# Arguments
unit
— Unitint
— Playerbool
[ preset::Unit_Color_Change_Option ] — Change Color
Returns — void
void libNtve_gf_RescueUnit(
unit lp_unit,
int lp_player,
bool lp_changeColor,
);
# 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
// L357
libNtve_gf_RescueUnit(lp_unit, gv_p1_USER, true)
// L1510
libNtve_gf_RescueUnit(autoEAEE2387_var, gv_p1_USER, true)
// L2688
libNtve_gf_RescueUnit(EventUnit(), gv_pLAYER_01_USER, true)
// L466
libNtve_gf_RescueUnit(lp_diamondback, gv_pLAYER_01_USER, true)
// L1073
libNtve_gf_RescueUnit(EventUnit(), gv_p01_USER, true)
// L1130
libNtve_gf_RescueUnit(autoBD279A32_var, gv_p01_USER, true)
// L1169
libNtve_gf_RescueUnit(EventUnit(), gv_p01_USER, true)
// L1218
libNtve_gf_RescueUnit(autoE8678206_var, gv_p01_USER, true)
// L1593
libNtve_gf_RescueUnit(EventUnit(), gv_p01_USER, true)
// L5498
libNtve_gf_RescueUnit(autoCCE1CD7E_var, gv_p01_USER, true)
// L5657
libNtve_gf_RescueUnit(UnitFromId(2), gv_p02_TYCHUS, true)
// L2864
libNtve_gf_RescueUnit(EventUnitCargo(), gv_p01_USER, true)
// L6775
libNtve_gf_RescueUnit(autoB784C752_var, gv_p01_USER, true)
// L5009
libNtve_gf_RescueUnit(gv_warbot, gv_p01_USER, true)
// L1961
libNtve_gf_RescueUnit(autoCE1A535E_var, gv_pLAYER_01_USER, true)
// L3671
libNtve_gf_RescueUnit(auto14DC20EB_var, gv_pLAYER01_USER, true)
// L3722
libNtve_gf_RescueUnit(auto2AB4C609_var, gv_pLAYER01_USER, true)
// L3773
libNtve_gf_RescueUnit(auto419AAC42_var, gv_pLAYER01_USER, true)
// L1835
libNtve_gf_RescueUnit(auto2AFE1C29_var, gv_p01_USER, true)
// L2050
libNtve_gf_RescueUnit(auto99D50804_var, gv_p01_USER, true)
// L2165
libNtve_gf_RescueUnit(lv_coCe, gv_p01_USER, true)
// L2231
libNtve_gf_RescueUnit(EventUnit(), gv_p01_USER, true)
// L2287
libNtve_gf_RescueUnit(auto2D9551B0_var, gv_p01_USER, true)
// L2362
libNtve_gf_RescueUnit(autoDB292AD8_var, gv_p01_USER, true)
// L2441
libNtve_gf_RescueUnit(auto1D10E944_var, gv_p01_USER, true)
// L2520
libNtve_gf_RescueUnit(auto59045EC4_var, gv_p01_USER, true)
// L2599
libNtve_gf_RescueUnit(autoFF38DCB0_var, gv_p01_USER, true)
// L2678
libNtve_gf_RescueUnit(autoF7D09147_var, gv_p01_USER, true)
// L3408
libNtve_gf_RescueUnit(UnitGroupUnit(UnitGroup("Diamondback", 0, RegionFromId(18), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1), gv_p11_ALLIED_CELLBLOCK_A, true)
// L3483
libNtve_gf_RescueUnit(lv_chosenTank, gv_p12_ALLIED_CELLBLOCK_B, true)
// L3491
libNtve_gf_RescueUnit(lv_chosenTank, gv_p12_ALLIED_CELLBLOCK_B, true)
// L5233
libNtve_gf_RescueUnit(autoBAD08B60_var, gv_p1_USER, true)
// L5236
libNtve_gf_RescueUnit(UnitFromId(44), gv_p1_USER, true)
// L5414
libNtve_gf_RescueUnit(autoF6C0C4EE_var, gv_p1_USER, true)
// L5421
libNtve_gf_RescueUnit(auto8C8E2B83_var, gv_p1_USER, true)
// L5423
libNtve_gf_RescueUnit(UnitFromId(44), gv_p1_USER, true)
// L1112
libNtve_gf_RescueUnit(autoF6137478_var, gv_p01_USER, true)
// L3145
libNtve_gf_RescueUnit(autoF42710C8_var, gv_p01_USER, true)
// L3297
libNtve_gf_RescueUnit(auto80C95A67_var, gv_p01_USER, true)
// L3417
libNtve_gf_RescueUnit(auto2C4C9513_var, gv_p01_USER, true)
// L3537
libNtve_gf_RescueUnit(auto9EA41264_var, gv_p01_USER, true)
// L3661
libNtve_gf_RescueUnit(auto84FA099F_var, gv_p01_USER, true)
// L3781
libNtve_gf_RescueUnit(autoB2F67AC6_var, gv_p01_USER, true)
// L1536
libNtve_gf_RescueUnit(auto3BC1DEE1_var, gv_pLAYER_01_USER, true)
// L1584
libNtve_gf_RescueUnit(autoC50B9DC9_var, gv_pLAYER_01_USER, true)
// L1632
libNtve_gf_RescueUnit(autoBE5341A9_var, gv_pLAYER_01_USER, true)
// L1680
libNtve_gf_RescueUnit(autoE715E49F_var, gv_pLAYER_01_USER, true)
// L451
libNtve_gf_RescueUnit(lp_rescuedUnit, gv_p01_USER, true)
// L2538
libNtve_gf_RescueUnit(autoC91771D7_var, gv_p01_USER, true)
// L2588
libNtve_gf_RescueUnit(auto85840440_var, gv_p01_USER, true)
// L2715
libNtve_gf_RescueUnit(auto6928B596_var, gv_p01_USER, true)
// L2765
libNtve_gf_RescueUnit(auto8C1E2B92_var, gv_p01_USER, true)
// L2773
libNtve_gf_RescueUnit(autoFEEFD5BB_var, gv_p1_USER, true)
// L4827
libNtve_gf_RescueUnit(autoA409A568_var, gv_p1_USER, true)
// L6854
libNtve_gf_RescueUnit(auto70C592E4_var, gv_p1_USER, true)
// L7361
libNtve_gf_RescueUnit(EventUnitProgressUnit(), gv_p1_USER, true)
// L2201
libNtve_gf_RescueUnit(UnitFromId(25), gv_p1_USER, true)
// L2235
libNtve_gf_RescueUnit(UnitFromId(17), gv_p1_USER, true)
// L2269
libNtve_gf_RescueUnit(UnitFromId(10), gv_p1_USER, true)
// L2303
libNtve_gf_RescueUnit(UnitFromId(162), gv_p1_USER, true)
// L2337
libNtve_gf_RescueUnit(UnitFromId(11), gv_p1_USER, true)
// L2371
libNtve_gf_RescueUnit(UnitFromId(199), gv_p1_USER, true)
// L3042
libNtve_gf_RescueUnit(UnitFromId(43), gv_p1_USER, true)
// L3085
libNtve_gf_RescueUnit(UnitFromId(563), gv_p1_USER, true)
// L3128
libNtve_gf_RescueUnit(UnitFromId(179), gv_p1_USER, true)
// L4270
libNtve_gf_RescueUnit(gv_darkTemplar01, gv_p1_USER, true)
// L1220
libNtve_gf_RescueUnit(UnitFromId(88), gv_p01_USER, true)
// L1265
libNtve_gf_RescueUnit(UnitFromId(173), gv_p01_USER, true)
// L1317
libNtve_gf_RescueUnit(lv_obelisk, gv_p01_USER, true)
// L1366
libNtve_gf_RescueUnit(lv_obelisk, gv_p01_USER, true)
// L1408
libNtve_gf_RescueUnit(UnitFromId(29), gv_p01_USER, true)
// L1448
libNtve_gf_RescueUnit(UnitFromId(170), gv_p01_USER, true)
// L1488
libNtve_gf_RescueUnit(UnitFromId(174), gv_p01_USER, true)
// L1629
libNtve_gf_RescueUnit(EventUnitProgressUnit(), gv_p01_USER, true)
// L4822
libNtve_gf_RescueUnit(autoEC5FE42D_var, gv_p01_USER, true)
// L4951
libNtve_gf_RescueUnit(auto98891B06_var, gv_p01_USER, true)
// L357
libNtve_gf_RescueUnit(lp_unit, gv_p1_USER, true)
// L1510
libNtve_gf_RescueUnit(autoEAEE2387_var, gv_p1_USER, true)
// L2688
libNtve_gf_RescueUnit(EventUnit(), gv_pLAYER_01_USER, true)
// L466
libNtve_gf_RescueUnit(lp_diamondback, gv_pLAYER_01_USER, true)
// L1073
libNtve_gf_RescueUnit(EventUnit(), gv_p01_USER, true)
// L1130
libNtve_gf_RescueUnit(autoBD279A32_var, gv_p01_USER, true)
// L1169
libNtve_gf_RescueUnit(EventUnit(), gv_p01_USER, true)
// L1218
libNtve_gf_RescueUnit(autoE8678206_var, gv_p01_USER, true)
// L1593
libNtve_gf_RescueUnit(EventUnit(), gv_p01_USER, true)
// L5498
libNtve_gf_RescueUnit(autoCCE1CD7E_var, gv_p01_USER, true)
// L5657
libNtve_gf_RescueUnit(UnitFromId(2), gv_p02_TYCHUS, true)
// L2864
libNtve_gf_RescueUnit(EventUnitCargo(), gv_p01_USER, true)
// L6775
libNtve_gf_RescueUnit(autoB784C752_var, gv_p01_USER, true)
// L5009
libNtve_gf_RescueUnit(gv_warbot, gv_p01_USER, true)
// L1961
libNtve_gf_RescueUnit(autoCE1A535E_var, gv_pLAYER_01_USER, true)
// L3671
libNtve_gf_RescueUnit(auto14DC20EB_var, gv_pLAYER01_USER, true)
// L3722
libNtve_gf_RescueUnit(auto2AB4C609_var, gv_pLAYER01_USER, true)
// L3773
libNtve_gf_RescueUnit(auto419AAC42_var, gv_pLAYER01_USER, true)
// L1835
libNtve_gf_RescueUnit(auto2AFE1C29_var, gv_p01_USER, true)
// L2050
libNtve_gf_RescueUnit(auto99D50804_var, gv_p01_USER, true)
// L2165
libNtve_gf_RescueUnit(lv_coCe, gv_p01_USER, true)
// L2231
libNtve_gf_RescueUnit(EventUnit(), gv_p01_USER, true)
// L2287
libNtve_gf_RescueUnit(auto2D9551B0_var, gv_p01_USER, true)
// L2362
libNtve_gf_RescueUnit(autoDB292AD8_var, gv_p01_USER, true)