WEAPONx FLAGS: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
No edit summary
Fox (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
WEAPONx_FLAGS is a [[gamevar]] that has the power to change several different things about weapons (not projectiles).
'''WEAPONx_FLAGS''' is a [[gamevar]] that has the power to change several different things about weapons (not projectiles).


It is a [[bitfield]].  The flag values for WEAPONx_FLAGS are:
== Flags ==


 
{{Weapon flags}}
{| {{prettytable}}
!Name!!Number!!Description!!
|-
|WEAPON_HOLSTER_CLEARS_CLIP
|align="right"|'''1'''
|Holster key "refills" magazine by removing excess ammo from the player
|-
|WEAPON_GLOWS
|align="right"|'''2'''
|Controls glowing effect on SHRINKER weapon's crystal, no effect on other weapons, probably breaks shotgun if used with that weapon
|-
|WEAPON_AUTOMATIC
|align="right"|'''4'''
|Resets [[kickback_pic]] to 1 instead of 0 when animation ends
|-
|WEAPON_FIREEVERYOTHER
|align="right"|'''8'''
|Fires projectiles every frame instead of when [[kickback_pic]] is equal to [[WEAPONx_FIREDELAY]].  Also alters burst fire behavior so that shots are dispatched once per tic instead of all at once.
|-
|WEAPON_FIREEVERYTHIRD
|align="right"|'''16'''
|Fires when [[kickback_pic]] [[modvar|%]] 3 == 0 (every third frame)
|-
|WEAPON_RANDOMRESTART
|align="right"|'''32'''
|When used with WEAPON_AUTOMATIC, resets [[kickback_pic]] to a random value between 1 and 4 instead of 1 when animation ends
|-
|WEAPON_AMMOPERSHOT
|align="right"|'''64'''
|Use ammo per shot per burst (like the Devastator)
|-
|WEAPON_BOMB_TRIGGER
|align="right"|'''128'''
|Is a bomb trigger (Pipebomb Detonator)
|-
|WEAPON_NOVISIBLE
|align="right"|'''256'''
|Using does NOT cause player to flash the level (clear visibility)
|-
|WEAPON_THROWIT
|align="right"|'''512'''
|Currently unused
|-
|WEAPON_CHECKATRELOAD
|align="right"|'''1024'''
|Check weapon availability at 'reload' time, only affects weapons with [[WEAPONx_WORKSLIKE]] of TRIPBOMB_WEAPON
|-
|WEAPON_STANDSTILL
|align="right"|'''2048'''
|Stops all player z-axis movement when firing
|-
|WEAPON_SPAWNTYPE1
|align="right"|'''0'''
|Spawn Type 1 (Pistol shells)
|-
|WEAPON_SPAWNTYPE2
|align="right"|'''4096'''
|Spawn Type 2 (Shotgun shells)
|-
|WEAPON_SPAWNTYPE3
|align="right"|'''8192'''
|Spawn Type 3 (Chaingun shells)
|-
|WEAPON_SEMIAUTO
|align="right"|'''16384'''
|Semi-automatic (cancel button press after each shot)
|-
|WEAPON_RELOAD_TIMING
|align="right"|'''32768'''
|Alternate formula for reload sound timing, generally used for pistol
|-
|WEAPON_RESET
|align="right"|'''65536'''
|Resets [[kickback_pic]] to 1 instead of 0 at end of firing animation if fire is held
|}


[[Category:Bitfields]]
[[Category:Bitfields]]
[[Category:Pre-defined gamevars]]
[[Category:Pre-defined gamevars]]

Latest revision as of 05:04, 21 February 2020

WEAPONx_FLAGS is a gamevar that has the power to change several different things about weapons (not projectiles).

Flags

The following values are used with WEAPONx_FLAGS.

Exposed Value Label Description
No 1 WEAPON_HOLSTER_CLEARS_CLIP Holster key "refills" magazine by removing excess ammo from the player
No 2 WEAPON_GLOWS Controls glowing effect on SHRINKER weapon's crystal, no effect on other weapons, probably breaks shotgun if used with that weapon
No 4 WEAPON_AUTOMATIC Resets kickback_pic to 1 instead of 0 when animation ends
No 8 WEAPON_FIREEVERYOTHER Fires projectiles every frame instead of when kickback_pic is equal to WEAPONx_FIREDELAY. Also alters burst fire behavior so that shots are dispatched once per tic instead of all at once.
No 16 WEAPON_FIREEVERYTHIRD Fires when kickback_pic  % 3 === 0 (every third frame)
No 32 WEAPON_RANDOMRESTART When used with WEAPON_AUTOMATIC, resets kickback_pic to a random value between 1 and 4 instead of 1 when animation ends
No 64 WEAPON_AMMOPERSHOT Use ammo per shot per burst (like the Devastator)
No 128 WEAPON_BOMB_TRIGGER Is a bomb trigger (Pipebomb Detonator)
No 256 WEAPON_NOVISIBLE Using does NOT cause player to flash the level (clear visibility)
No 512 WEAPON_THROWIT Currently unused
No 1024 WEAPON_CHECKATRELOAD Check weapon availability at 'reload' time, only affects weapons with WEAPONx_WORKSLIKE of TRIPBOMB_WEAPON
No 2048 WEAPON_STANDSTILL Stops all player z-axis movement when firing
No 4096 WEAPON_SPAWNTYPE2 Spawn Type 2 (Shotgun shells)
No 8192 WEAPON_SPAWNTYPE3 Spawn Type 3 (Chaingun shells)
No 16384 WEAPON_SEMIAUTO Semi-automatic (cancel button press after each shot)
No 32768 WEAPON_RELOAD_TIMING Alternate formula for reload sound timing, generally used for pistol
No 65536 WEAPON_RESET Resets kickback_pic to 1 instead of 0 at end of firing animation if fire is held
Defines
define WEAPON_HOLSTER_CLEARS_CLIP       0x00000001
define WEAPON_GLOWS                     0x00000002
define WEAPON_AUTOMATIC                 0x00000004
define WEAPON_FIREEVERYOTHER            0x00000008
define WEAPON_FIREEVERYTHIRD            0x00000010
define WEAPON_RANDOMRESTART             0x00000020
define WEAPON_AMMOPERSHOT               0x00000040
define WEAPON_BOMB_TRIGGER              0x00000080
define WEAPON_NOVISIBLE                 0x00000100
define WEAPON_THROWIT                   0x00000200
define WEAPON_CHECKATRELOAD             0x00000400
define WEAPON_STANDSTILL                0x00000800
define WEAPON_SPAWNTYPE2                0x00001000
define WEAPON_SPAWNTYPE3                0x00002000
define WEAPON_SEMIAUTO                  0x00004000
define WEAPON_RELOAD_TIMING             0x00008000
define WEAPON_RESET                     0x00010000