GSC reference › Built-in
SetSprintCooldown()
Built-in (engine)
Server
Player Called on: player
Set the player's sprint cooldown duration
Signature
<player> SetSprintCooldown(<duration>)
Called on an entity: player SetSprintCooldown(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| duration | Required | The duration to set |
Example (from Treyarch's docs)
self SetSprintCooldown( 4 )
Real uses in BO3's scripts
Called 19 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_altbody_beast.gsc, line 203
self setsprintcooldown(0); - scripts/zm/_zm_turned.gsc, line 169
self setsprintcooldown(0); - scripts/zm/zm_asylum.gsc, line 334
self setsprintcooldown(0); - scripts/zm/zm_castle_characters.gsc, line 169
self setsprintcooldown(0); - scripts/zm/zm_cosmodrome.gsc, line 867
self setsprintcooldown(0);
Related built-ins
- AllowSprint()Sets whether the player can sprint
- SetSprintDuration()Set the player's sprint duration
- SetClientPlayerSprintTime()Sets player_sprintTime dvar only on this client
- SprintButtonPressed()Check if the player is pressing the 'sprint' button.
- SprintUpRequired()Force the player to release the sprint button before sprinting.
- IsSprinting()Returns true if the player is sprinting.
- IsPlayerSprinting()Returns 1 if the player is currently sprinting
- sprintf()Replaces field specifiers in a string with values passed in, returns result string format specifiers take the form of {[n]} in the source string...
- AllClientsPrint()Cause all clients to print the localized version of this string.
- GetCurrentWeapon()Gets the current player weapon
- SetLUIMenuData()Sets a data value for a given lui menu, the data name has to be precached and the value as well, if its a string.
- GiveWeapon()Give a weapon to the player
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).