# Ability Command Count Producing Unit

Grammar — The number of ability commands that produce unitType
FlagsNative | Function

# Arguments

  • string<gamelink::Unit> — Unit Type

Returns — int

native int TechTreeUnitProducedAbilCmdCount(
	string unitType,
);

Category: Tech Tree / Production

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:6027

        lv_uT = UserDataGetUnit(libCOMI_gv_cM_Tychus_UserTypeHeroList, lv_instance, "Unit Type", 1);
        if ((TechTreeUnitIsAllowed(lp_p, lv_uT) == true)) {
            auto3D8DE2E4_ae = (TechTreeUnitProducedAbilCmdCount(lv_uT) - 1);
            lv_i = 0;
            for ( ; ( (auto3D8DE2E4_ai >= 0 && lv_i <= auto3D8DE2E4_ae) || (auto3D8DE2E4_ai < 0 && lv_i >= auto3D8DE2E4_ae) ) ; lv_i += auto3D8DE2E4_ai ) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:24090

    lv_isQueuedOrder = OrderGetFlag(lv_orderDummy, c_cmdQueued);
    lv_ut = UnitGetType(lv_target);
    lv_c = TechTreeUnitProducedAbilCmdCount(lv_ut);

    // Conditions

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:24165

    lv_isQueuedOrder = OrderGetFlag(lv_orderDummy, c_cmdQueued);
    lv_ut = UnitGetType(lv_target);
    lv_c = TechTreeUnitProducedAbilCmdCount(lv_ut);

    // Conditions