# Unit Attribute Point

GrammarbaseBonus attribute point count of attribute on unit
FlagsNative | Function

Returns the point count of the an attribute behavior on a unit.

# Arguments

  • unit — Unit
  • string<gamelink::Behavior> — Attribute
  • bool<preset::BaseBonusOptions> — Base/Bonus

Returns — int

native int UnitGetAttributePoint(
	unit inUnit,
	string attribute,
	bool baseBonus,
);

Category: Behavior / Attribute

# Examples

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:504

        lv_itBuff = UnitBehaviorGet(lv_caster, lv_i);
        if ((CatalogEntryScope(c_gameCatalogBehavior, lv_itBuff) == "CBehaviorAttribute")) {
            lv_itStack = UnitGetAttributePoint(lp_source, lv_itBuff, true);
            UnitSetAttributePoint(lv_target, lv_itBuff, true, lv_itStack);
        }

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:1656

    lv_mana = EventUnitSpentVitalAmount();
    UnitBehaviorAdd(lv_u, libGAwX_gv_manaFlareManaTokenLink, lv_u, 1);
    UnitSetAttributePoint(lv_u, libGAwX_gv_manaFlareManaTokenLink, true, (FixedToInt(lv_mana) + UnitGetAttributePoint(lv_u, libGAwX_gv_manaFlareManaTokenLink, true)));
    return true;
}