CheckReloadEx is a weapon scripting function that compares the current ammo with a value or a counter and jumps to another state if the test passes.
CheckReloadEx(state, checktype, value, psprnum)
- state: state to jump to if test passes
- checktype: test to perform. Can be one of the following:
- less or 0
- lessorequal or 1
- greater or 2
- greaterorequal or 3
- equal or 4
- notequal or 5
- and or 6
- less_counter or 7
- lessorequal_counter or 8
- greater_counter or 9
- greaterorequal_counter or 10
- equal_counter or 11
- notequal_counter or 12
- and_counter or 13
- value: immediate value OR counter number to compare against
- psprnum: psprite to affect (weapon or flash). Can be one of the following:
- weapon or 0
- flash or 1
No examples given.
The object of comparison is player's current ammo, either to an immediate value (if checktype is between 0 and 6) or to a weapon counter (if checktype is between 7 and 13). Only 3 counters (0, 1, 2) are available per player weapon. If the comparison test passes, the current player gun frame is switched to the one designated by state.
"And" comparison means that the test will pass if bitwise AND operation returns a nonzero value.
The psprnum field selects which one of the two types of Doom gun sprites to switch: main weapon sprite, or the superimposed gunflash sprite.