# Custom Value Of Unit
Grammar — Custom value index of u
Flags —Native
|Function
Returns a custom value of a unit.
# Arguments
unit
— Unitint
— Index
Returns — fixed
native fixed UnitGetCustomValue(unit inUnit, int inIndex);
# 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
// L1103
UnitGetCustomValue(lp_guardian, 0)
// L1667
UnitGetCustomValue(lp_scienceVessel, 0)
// L1721
UnitGetCustomValue(lp_battlecruiser, 0)
// L2496
UnitGetCustomValue(lv_pickedUnit, 0)
// L327
UnitGetCustomValue(lp_attackedStructure, 0)
// L1418
UnitGetCustomValue(auto7ECFBFDB_var, 0)
// L1456
UnitGetCustomValue(EventUnit(), 0)
// L1885
UnitGetCustomValue(EventUnit(), 2)
// L2006
UnitGetCustomValue(gv_infestableStructure[lv_index], 0)
// L2007
UnitGetCustomValue(gv_infestableStructure[lv_index], 0)
// L2645
UnitGetCustomValue(EventUnit(), 1)
// L1508
UnitGetCustomValue(EventUnit(), 1)
// L1564
UnitGetCustomValue(EventUnitProgressUnit(), 1)
// L1665
UnitGetCustomValue(EventUnit(), 1)
// L2063
UnitGetCustomValue(autoB51C2030_var, (ge_UnitData_udEggType))
// L2064
UnitGetCustomValue(autoB51C2030_var, (ge_UnitData_udEggScale))
// L2065
UnitGetCustomValue(autoB51C2030_var, (ge_UnitData_udEggColony))
// L2148
UnitGetCustomValue(auto499A4BF2_var, 0)
// L2149
UnitGetCustomValue(auto499A4BF2_var, 0)
// L2150
UnitGetCustomValue(auto499A4BF2_var, 0)
// L2155
UnitGetCustomValue(auto499A4BF2_var, 0)
// L3296
UnitGetCustomValue(auto5F63F107_var, 0)
// L1723
UnitGetCustomValue(auto6ADED6AB_var, 1)
// L4408
UnitGetCustomValue(EventUnit(), 1)
// L4409
UnitGetCustomValue(EventUnit(), 1)
// L5739
UnitGetCustomValue(lv_door, 0)
// L5740
UnitGetCustomValue(lv_door, 0)
// L1362
UnitGetCustomValue(autoC0A4CB95_var, 0)
// L1938
UnitGetCustomValue(EventUnit(), 1)
// L1970
UnitGetCustomValue(EventUnit(), 1)
// L2002
UnitGetCustomValue(EventUnit(), 1)
// L2125
UnitGetCustomValue(auto4D3A1C8E_var, 0)
// L2137
UnitGetCustomValue(autoA22A473B_var, 1)
// L2147
UnitGetCustomValue(auto18D9D224_var, 1)
// L2473
UnitGetCustomValue(auto3A77AE5A_var, 0)
// L2523
UnitGetCustomValue(autoD8BCE623_var, 0)
// L2540
UnitGetCustomValue(autoF124A860_var, 0)
// L2553
UnitGetCustomValue(lv_indexUnit, 0)
// L2612
UnitGetCustomValue(lv_scientist, 0)
// L2668
UnitGetCustomValue(lv_scientist, 0)
// L2724
UnitGetCustomValue(lv_scientist, 0)
// L9751
UnitGetCustomValue(lv_egg, 0)
// L10018
UnitGetCustomValue(lv_hybridLocal, 0)
// L10069
UnitGetCustomValue(lv_hybridLocal, 0)
// L10120
UnitGetCustomValue(lv_hybridLocal, 0)
// L12534
UnitGetCustomValue(lv_scientist, 0)
// L2498
UnitGetCustomValue(lp_unit, (ge_CustomDataIndex_CustomDataIndexClickableLock))
// L2503
UnitGetCustomValue(lp_unit, (ge_CustomDataIndex_CustomDataIndexClickableRoom))
// L9588
UnitGetCustomValue(lv_hotspot, (ge_CustomDataIndex_CustomDataIndexFlashingData))
// L9603
UnitGetCustomValue(lp_unit, (ge_CustomDataIndex_CustomDataIndexFlashingData))
// L9891
UnitGetCustomValue(lp_unit, (ge_CustomDataIndex_CustomDataIndexFlashingData))
// L1220
UnitGetCustomValue(lv_u, 0)
// L1293
UnitGetCustomValue(lv_u, 1)
// L1293
UnitGetCustomValue(lv_u, 2)
// L1294
UnitGetCustomValue(lv_u, 0)
// L270
UnitGetCustomValue(gv_terrazineNodes[lp_primaryTerrazineIndex], 4)
// L290
UnitGetCustomValue(autoD682E799_var, 4)
// L295
UnitGetCustomValue(UnitGroupRandomUnit(lv_terrazineGroup, c_unitCountAlive), 0)
// L303
UnitGetCustomValue(UnitGroupRandomUnit(UnitGroup("TerrazineCanister", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive), 0)
// L484
UnitGetCustomValue(autoA7EA04C4_var, 4)
// L497
UnitGetCustomValue(auto96AA0583_var, 0)
// L502
UnitGetCustomValue(auto96AA0583_var, 0)
// L533
UnitGetCustomValue(auto7CD40DCB_var, 0)
// L538
UnitGetCustomValue(auto7CD40DCB_var, 0)
// L568
UnitGetCustomValue(lv_pickedUnit, 0)
// L2253
UnitGetCustomValue(lv_tempUnit, 0)
// L2253
UnitGetCustomValue(lv_tempUnit, 1)
// L2258
UnitGetCustomValue(lv_tempUnit, 0)
// L2258
UnitGetCustomValue(lv_tempUnit, 1)
// L2272
UnitGetCustomValue(auto398840A4_var, 0)
// L2272
UnitGetCustomValue(auto398840A4_var, 1)
// L2416
UnitGetCustomValue(auto67BD9FEE_var, 0)
// L2416
UnitGetCustomValue(auto67BD9FEE_var, 1)
// L2425
UnitGetCustomValue(auto67BD9FEE_var, 0)
// L2425
UnitGetCustomValue(auto67BD9FEE_var, 1)
// L2468
UnitGetCustomValue(lv_tempSpineCrawler, 0)
// L2478
UnitGetCustomValue(lv_tempSpineCrawler, 0)
// L2760
UnitGetCustomValue(EventUnit(), 0)
// L2760
UnitGetCustomValue(EventUnit(), 1)
// L2796
UnitGetCustomValue(autoB111683E_var, 0)
// L2796
UnitGetCustomValue(autoB111683E_var, 1)
// L2803
UnitGetCustomValue(autoB111683E_var, 0)
// L2803
UnitGetCustomValue(autoB111683E_var, 1)
// L767
UnitGetCustomValue(UnitFromId(317), 0)
// L800
UnitGetCustomValue(UnitFromId(317), 0)
// L1053
UnitGetCustomValue(gv_siegeTankDropship, 0)
// L1064
UnitGetCustomValue(gv_siegeTankDropship, 0)
// L3627
UnitGetCustomValue(EventUnit(), 0)
// L3648
UnitGetCustomValue(auto6C20341F_var, 0)
// L3697
UnitGetCustomValue(EventUnit(), 0)
// L3732
UnitGetCustomValue(lv_transferUnit, 0)
// L3776
UnitGetCustomValue(EventUnit(), 0)
// L3811
UnitGetCustomValue(lv_transferUnit, 0)
// L837
UnitGetCustomValue(lv_u, 0)
// L837
UnitGetCustomValue(lv_u, 1)
// L2445
UnitGetCustomValue(autoD1A466A2_var, 0)
// L2446
UnitGetCustomValue(autoD1A466A2_var, 0)
// L6809
UnitGetCustomValue(auto4771A35A_var, 0)
// L6809
UnitGetCustomValue(auto4771A35A_var, 1)
// L6815
UnitGetCustomValue(auto4771A35A_var, 0)