SetWeaponFiringRate: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Added OOP syntax and Needs Example template) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{Needs_Example}} | |||
This function sets the firing rate to be used when a [[Element/Weapon|custom weapon]] is in ''firing'' state. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool setWeaponFiringRate ( weapon theWeapon, int firingRate )</syntaxhighlight> | <syntaxhighlight lang="lua">bool setWeaponFiringRate ( weapon theWeapon, int firingRate )</syntaxhighlight> | ||
{{OOP||[[Element/Weapon|weapon]]:setFiringRate|firingRate|getWeaponFiringRate}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
* '''theWeapon:''' The weapon to modify the firing rate of. | * '''theWeapon:''' The weapon to modify the firing rate of. | ||
* '''firingRate:''' The weapon firing rate. | * '''firingRate:''' The weapon firing rate. It seems to be a kind of frecuency value, so the lower the quicker the [[Element/Weapon|custom weapon]] will shoot. | ||
===Returns=== | ===Returns=== | ||
Line 16: | Line 18: | ||
{{Requirements|n/a|1.3.0-9.04555|}} | {{Requirements|n/a|1.3.0-9.04555|}} | ||
==See | ==See also== | ||
{{Client weapon creation functions}} | {{Client weapon creation functions}} |
Revision as of 17:16, 23 December 2014
Script Example Missing Function SetWeaponFiringRate needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
This function sets the firing rate to be used when a custom weapon is in firing state.
Syntax
bool setWeaponFiringRate ( weapon theWeapon, int firingRate )
OOP Syntax Help! I don't understand this!
- Method: weapon:setFiringRate(...)
- Variable: .firingRate
- Counterpart: getWeaponFiringRate
Required Arguments
- theWeapon: The weapon to modify the firing rate of.
- firingRate: The weapon firing rate. It seems to be a kind of frecuency value, so the lower the quicker the custom weapon will shoot.
Returns
Returns true on success, false otherwise.
Requirements
This template will be deleted.
See also
- createWeapon
- fireWeapon
- getWeaponAmmo
- getWeaponClipAmmo
- getWeaponFiringRate
- getWeaponFlags
- getWeaponOwner
- getWeaponProperty
- getWeaponState
- getWeaponTarget
- resetWeaponFiringRate
- setWeaponAmmo
- setWeaponClipAmmo
- setWeaponFiringRate
- setWeaponFlags
- setWeaponProperty
- setWeaponState
- setWeaponTarget