# Add Cooldown For Unit Behavior

Grammar — Add inVal seconds to cooldown inCooldown on behavior inBehavior on unit inUnit
FlagsNative | Action

Adds time to the specified behavior cooldown link.

# Arguments

  • unit — Unit
  • string<gamelink::Behavior> — Behavior
  • string<cooldown> — Cooldown
  • fixed — Value

Returns — void

native void UnitBehaviorAddCooldown(
	unit inUnit,
	string inBehavior,
	string inCooldown,
	fixed inVal,
);

Category: Unit / Charges And Cooldowns

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:5855

    // Automatic Variable Declarations
    // Implementation
    UnitBehaviorAddCooldown(lp_inUnit, lp_inBehavior, lp_inCooldown, (-1.0 * UnitBehaviorGetCooldown(lp_inUnit, lp_inBehavior, lp_inCooldown)));
}

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:4993

    // Automatic Variable Declarations
    // Implementation
    UnitBehaviorAddCooldown(lp_inUnit, lp_inBehavior, lp_inCooldown, (-1.0 * UnitBehaviorGetCooldown(lp_inUnit, lp_inBehavior, lp_inCooldown)));
}

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

    }

    UnitBehaviorAddCooldown(lv_u, libCOMI_gv_cM_DehakaMutaliskReviveCooldownIndicator, "Behavior/PrimalReconstitutionCooldownIndicator", UnitBehaviorDurationTotal(lv_u, lv_behavior));
    return true;
}

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

    UnitBehaviorAdd(lv_darkTemplar, "ZeratulDarkTemplarRetreatCooldown", lv_darkTemplar, 1);
    UnitBehaviorAdd(lv_darkTemplar, "ZeratulDarkTemplarRetreatRegen", lv_darkTemplar, 1);
    UnitBehaviorAddCooldown(lv_darkTemplar, "ZeratulDarkTemplarRetreatCooldownDisplay", "Behavior/ZeratulDarkTemplarRetreatCooldownDisplay", UnitBehaviorDurationTotal(lv_darkTemplar, "ZeratulDarkTemplarRetreatCooldown"));
    return true;
}