# Set Behavior Count
Grammar — Set inBehavior count to inCount for inUnit from inCaster
Flags —Action
# Arguments
unit
— Unitstring
<gamelink::Behavior> — Behaviorunit
— Casterint
— Count
Returns — void
void libNtve_gf_SetBehaviorCount(
unit lp_inUnit,
string lp_inBehavior,
unit lp_inCaster,
int lp_inCount,
);
# Related
Category: Behavior / Basic
- Remove Behaviors By Category —
void
— UnitBehaviorRemoveCategory - Remove Behavior (Player) —
void
— UnitBehaviorRemovePlayer - Remove Behavior —
void
— UnitBehaviorRemove - Add Behavior (Player) —
void
— UnitBehaviorAddPlayer - Add Behavior —
void
— UnitBehaviorAdd - Set Behavior Count —
void
— libNtve_gf_SetBehaviorCount - Number Of Behaviors On Unit —
int
— UnitBehaviorCountAll - Unit Behavior —
string
<gamelink::Behavior> — UnitBehaviorGet - Unit Has Behavior —
bool
— UnitHasBehavior2 - Unit Has Behavior (Enabled) —
bool
— UnitHasBehavior - Unit Behavior Enabled —
bool
— UnitBehaviorEnabled - Stack Count Of Behavior On Unit —
int
— UnitBehaviorCount - Behavior Has Flag —
bool
— UnitBehaviorHasFlag - Transfer Behavior —
void
— UnitBehaviorTransfer - Set Unit Behavior Duration —
void
— UnitBehaviorSetDuration - Set Unit Behavior Duration Remaining —
void
— UnitBehaviorSetDurationRemaining - Duration Remaining Of Behavior On Unit —
fixed
— UnitBehaviorDuration - Duration Of Behavior On Unit —
fixed
— UnitBehaviorDurationTotal - Set Unit Behavior Spawn Count —
void
— UnitBehaviorSpawn - Unit Behavior Effect Player —
int
— UnitBehaviorEffectPlayer - Unit Behavior Effect Unit —
unit
— UnitBehaviorEffectUnit - Set Unit Behavior User Data —
void
— UnitBehaviorEffectTreeSetUserData - User Data Of Behavior On Unit —
fixed
— UnitBehaviorEffectTreeUserData - User Data Of Behavior On Unit Exists —
bool
— UnitBehaviorEffectTreeUserDataExists - Unit Behavior Changes —
void
— TriggerAddEventUnitBehaviorChange - Unit Behavior Changes From Category —
void
— TriggerAddEventUnitBehaviorChangeFromCategory - Triggering Behavior —
string
<gamelink::Behavior> — EventUnitBehavior - Triggering Behavior Change —
int
<preset::BehaviorChange> — EventUnitBehaviorChange - Unit Behavior Damage Modify Remaining —
fixed
— UnitBehaviorDamageModifyRemaining - Unit Behavior Damage Modify Limit —
fixed
— UnitBehaviorDamageModifyLimit - For Each Behavior On Unit — macro
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:13994
lv_itUnit = UnitGroupUnitFromEnd(auto2A64ECBF_g, auto2A64ECBF_u);
if (lv_itUnit == null) { break; }
libNtve_gf_SetBehaviorCount(lv_itUnit, lv_behavior, lv_caster, lv_stack);
}
return true;
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:980
}
libNtve_gf_SetBehaviorCount(lv_u, "SubgroupIncrease", lv_u, (10-libGAwX_gv_heroCreationCount));
UnitSetAttributePoint(lv_u, "SubgroupIncrease", true, libGAwX_gv_heroCreationCount);
libGAwX_gv_heroCreationCount += 1;