# Unit Property (Int)
Grammar — u prop (current|Current/Default)
Flags —Native
|Function
Returns a unit property.
# Arguments
unit
— Unitint
[ preset::Unit_Property ] — Propertybool
[ preset::CurrentDefaultOption ] — Current
Returns — int
native int UnitGetPropertyInt(
unit inUnit,
int inProp,
bool inCurrent,
);
# Related
Category: Unit / Properties
- [F] —
string
[ gamelink::Unit ] — Unit Type Of Unit — ( UnitGetType ) - [F] —
int
— Unit Tag — ( UnitGetTag ) - [F] —
int
— Unit Seed — ( UnitGetSeed ) - [F] —
void
— Unit Property Changes — ( TriggerAddEventUnitProperty ) - [F] —
int
[ preset::Unit_Property ] — Triggering Unit Property — ( EventUnitProperty ) - [F] —
int
— Triggering Unit Property Change (Integer) — ( EventUnitPropertyChangeInt ) - [F] —
fixed
— Triggering Unit Property Change (Real) — ( EventUnitPropertyChangeFixed ) - [F] —
void
— Set Unit Property — ( UnitSetPropertyFixed ) - [F] —
void
— Set Unit State — ( UnitSetState ) - [F] —
void
— Set Unit Seed — ( UnitSetSeed ) - [F] —
void
— Reset Unit Seed — ( UnitResetSeed ) - [F] —
void
— Make Unit Invulnerable — ( libNtve_gf_MakeUnitInvulnerable ) - [F] —
void
— Make Unit Uncommandable — ( libNtve_gf_MakeUnitUncommandable ) - [F] —
fixed
— Unit Property — ( UnitGetPropertyFixed ) - [F] —
int
— Unit Property (Int) — ( UnitGetPropertyInt ) - [F] —
fixed
— Unit Type Property — ( UnitTypeGetProperty ) - [F] —
bool
— Unit Classification Check — ( UnitTestState ) - [F] —
bool
— Unit Type Classification Check — ( UnitTypeTestFlag ) - [F] —
bool
— Unit Type Attribute Check — ( UnitTypeTestAttribute ) - [F] —
bool
— Unit Targetable Check — ( UnitTestPlane ) - [F] —
bool
— Unit Is Invulnerable — ( libNtve_gf_UnitIsInvulnerable ) - [F] —
int
— Unit Kills — ( libNtve_gf_UnitGetPropertyKills ) - [F] —
int
— Unit Resources — ( libNtve_gf_UnitGetPropertyResources ) - [F] —
point
— Unit Attachment Point — ( UnitGetAttachmentPoint ) - [F] —
text
— Name Of Unit Type — ( UnitTypeGetName ) - [F] —
string
— Gender Code Of Unit Type — ( UnitTypeGetGenderCode ) - [F] —
int
— Unit Type Cost — ( UnitTypeGetCost ) - [F] —
bool
— Unit Type Is Affected By Upgrade — ( UnitTypeIsAffectedByUpgrade ) - [F] —
void
— Reset Movement Speed — ( UnitResetSpeed ) - [F] —
bool
— Unit Uses Mover — ( UnitMoverExists ) - [F] —
bool
— Unit Type Uses Mover — ( libNtve_gf_UnitMoverExists ) - [F] —
string
[ gamelink::Unit ] — Unit Type From String — ( UnitTypeFromString ) - [F] —
void
— Set Unit Color — ( UnitSetTeamColorIndex ) - [F] —
void
— Set Unit Info Button - Ability Tooltip — ( libNtve_gf_SetUnitInfoButtonAbilityTooltip ) - [F] —
void
— Set Unit Info Button - Button Tooltip — ( libNtve_gf_SetUnitInfoButtonButtonTooltip ) - [F] —
void
— Set Unit Info Button - Item Tooltip — ( libNtve_gf_SetUnitInfoButtonItemTooltip ) - [F] —
void
— Reset Unit Info Button - Ability Tooltip — ( libNtve_gf_ResetUnitInfoButtonAbilityTooltip ) - [F] —
void
— Reset Unit Info Button - Button Tooltip — ( libNtve_gf_ResetUnitInfoButtonButtonTooltip ) - [F] —
void
— Reset Unit Info Button - Item Tooltip — ( libNtve_gf_ResetUnitInfoButtonItemTooltip ) - [F] —
void
— Set Unit Command Button Tooltip — ( UnitSetInfoButtonTooltip ) - [F] —
void
— Reset Unit Command Button Tooltip — ( UnitClearInfoButtonTooltip ) - [F] —
void
— Set Unit Highlight Cursor — ( UnitSetCursor ) - [F] —
void
— Set Unit Ping Cursor — ( UnitSetPingCursor ) - [F] —
void
— Set Unit Info — ( UnitSetInfoText ) - [F] —
void
— Set Unit Info Text — ( UnitSetInfoText2 ) - [F] —
void
— Set Unit Info Tip — ( UnitSetInfoTip ) - [F] —
void
— Set Unit Info SubTip — ( UnitSetInfoSubTip ) - [F] —
void
— Clear Unit Info — ( UnitClearInfoText ) - [F] —
void
— Set Unit Status Bar State (Deprecated) — ( UnitForceStatusBar ) - [F] —
void
— Show Unit Status Bar — ( UnitStatusBarOverride ) - [F] —
void
— Hide Unit Status Bar — ( UnitStatusBarClearOverride ) - [F] —
void
— Set Unit Scale — ( UnitSetScale ) - [F] —
void
— Set Unit Model Variation — ( libNtve_gf_UnitSetVariation ) - [F] —
void
— Change Unit Height — ( UnitSetHeight ) - [F] —
fixed
— Height Of Unit — ( UnitGetHeight ) - [F] —
void
— Change Unit Damage — ( libNtve_gf_ChangeUnitDamage ) - [F] —
unit
— Add On Child — ( UnitAddOnChild ) - [F] —
unit
— Add On Parent — ( UnitAddOnParent )
# Examples
# mods/core.sc2mod
// L300
UnitGetPropertyInt(obstruction, c_unitPropLifePercent, c_unitPropCurrent)
# mods/core.sc2mod
// L102
UnitGetPropertyInt(friendlyUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L121
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L122
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L188
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L189
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L481
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L897
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L1200
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L1612
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L1654
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
# mods/core.sc2mod
// L1101
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L1341
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L1440
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
# mods/core.sc2mod
// L96
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L583
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L708
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L1026
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L1318
UnitGetPropertyInt(unitToCheck, c_unitPropSuppliesMade, c_unitPropCurrent)
// L1319
UnitGetPropertyInt(unitToCheck, c_unitPropLife, c_unitPropCurrent)
# mods/starcoop/starcoop.sc2mod
// L103
UnitGetPropertyInt(friendlyUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L123
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L124
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L506
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L869
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L1159
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L1601
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L1643
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
# mods/starcoop/starcoop.sc2mod
// L1084
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L1313
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L1393
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
# mods/starcoop/starcoop.sc2mod
// L97
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L794
UnitGetPropertyInt(aiUnit, c_unitPropEnergy, c_unitPropCurrent)
// L921
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L1235
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
# mods/warcoop/warclassicsystem.sc2mod
// L727
UnitGetPropertyInt(lv_itUnit, c_unitPropLevel, c_unitPropCurrent)
# mods/warcoop/warclassicsystem.sc2mod
// L480
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
// L549
UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent)
# mods/warcoop/warmeleeai.sc2mod
// L93
UnitGetPropertyInt(u, c_unitPropResources, c_unitPropCurrent)
# mods/warcoop/warmeleeai.sc2mod
// L389
UnitGetPropertyInt(obstruction, c_unitPropLifePercent, c_unitPropCurrent)