A CheckForReload: Difference between revisions
Jump to navigation
Jump to search
m (Italicized "counter" to indicate its variableness.) |
m (codepointer template) |
||
| Line 1: | Line 1: | ||
'''A_CheckForReload''' (int ''counter'', str ''state''[, bool ''dontincrement'']) |
{{codepointer|Weapon}}'''A_CheckForReload''' (int ''counter'', str ''state''[, bool ''dontincrement'']) |
||
Jumps to the specified state if the function has not been called ''counter'' times. If ''dontincrement'' is true (default is false), then the reload counter isn't increased by a call to this function. This action is part of a generalized version of Skulltag's [[A_CheckRailReload]] and may not be particularly useful for creating complex reloading systems in weapons. Here's an example from the rail guns fire state using the function. |
Jumps to the specified state if the function has not been called ''counter'' times. If ''dontincrement'' is true (default is false), then the reload counter isn't increased by a call to this function. This action is part of a generalized version of Skulltag's [[A_CheckRailReload]] and may not be particularly useful for creating complex reloading systems in weapons. Here's an example from the rail guns fire state using the function. |
||
| Line 12: | Line 12: | ||
== See also == |
== See also == |
||
* [[A_ResetReloadCounter]] |
* [[A_ResetReloadCounter]] |
||
[[category:Decorate Weapon functions]]{{DEFAULTSORT:CheckForReload}} |
|||
Revision as of 10:08, 6 September 2012
A_CheckForReload (int counter, str state[, bool dontincrement])
Jumps to the specified state if the function has not been called counter times. If dontincrement is true (default is false), then the reload counter isn't increased by a call to this function. This action is part of a generalized version of Skulltag's A_CheckRailReload and may not be particularly useful for creating complex reloading systems in weapons. Here's an example from the rail guns fire state using the function.
Examples
Fire: RLGG E 12 A_FireRailgun RLGG F 6 A_CheckForReload(4, "Reloaded") RLGG GHIJK 6 RLGG L 6 A_ResetReloadCounter