CheckReloadEx
From Eternity Wiki
Jump to navigationJump to search
Description
CheckReloadEx is an extended version of JumpIfNoAmmo that can compare against flexible values rather than assuming weapon's ammo per shot is the value to compare against.
Usage
CheckReloadEx(state, checktype, value, psprnum)
Parameters
- state: state to jump to if test fails
- 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
Examples
No examples given.
Notes
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.
The psprnum field selects which one of the two types of Doom gun sprites to use: main weapon sprite, or the superimposed gunflash sprite.