# Set Behavior Count

Grammar — Set inBehavior count to inCount for inUnit from inCaster
FlagsAction

# Arguments

  • unit — Unit
  • string<gamelink::Behavior> — Behavior
  • unit — Caster
  • int — Count

Returns — void

void libNtve_gf_SetBehaviorCount(
	unit lp_inUnit,
	string lp_inBehavior,
	unit lp_inCaster,
	int lp_inCount,
);

Category: Behavior / Basic

# Examples

mods/starcoop/starcoop.sc2modbase.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.sc2modbase.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;