WEAPONx FLAGS: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 9: Line 9:
|WEAPON_HOLSTER_CLEARS_CLIP
|WEAPON_HOLSTER_CLEARS_CLIP
|align="right"|'''1'''
|align="right"|'''1'''
|Holstering clears clip
|Holster key "refills" magazine by removing excess ammo from the player
|-
|-
|WEAPON_GLOWS
|WEAPON_GLOWS
|align="right"|'''2'''
|align="right"|'''2'''
|Glows
|Controls glowing effect on SHRINKER weapon's crystal, no effect on other weapons, probably breaks shotgun if used with that weapon
|-
|-
|WEAPON_AUTOMATIC
|WEAPON_AUTOMATIC
|align="right"|'''4'''
|align="right"|'''4'''
|Automatic
|Enables additional logic for "automatic" weapons
|-
|-
|WEAPON_FIREEVERYOTHER
|WEAPON_FIREEVERYOTHER
|align="right"|'''8'''
|align="right"|'''8'''
|Fire every other frame
|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
|WEAPON_FIREEVERYTHIRD
|align="right"|'''16'''
|align="right"|'''16'''
|Fire every third frame
|Fires when [[kickback_pic]] % 3 == 0 (every third frame)
|-
|-
|WEAPON_RANDOMRESTART
|WEAPON_RANDOMRESTART
|align="right"|'''32'''
|align="right"|'''32'''
|Random restart on automatic
|When used with WEAPON_AUTOMATIC, resets [[kickback_pic]] to a random value between 1 and 4 instead of 1 when animation ends
|-
|-
|WEAPON_AMMOPERSHOT
|WEAPON_AMMOPERSHOT
|align="right"|'''64'''
|align="right"|'''64'''
|Use ammo per burst (like the Devastator)
|Use ammo per shot per burst (like the Devastator)
|-
|-
|WEAPON_BOMB_TRIGGER
|WEAPON_BOMB_TRIGGER
Line 49: Line 49:
|WEAPON_CHECKATRELOAD
|WEAPON_CHECKATRELOAD
|align="right"|'''1024'''
|align="right"|'''1024'''
|Check weapon availability at 'reload' time
|Check weapon availability at 'reload' time, only affects weapons with [[WEAPONx_WORKSLIKE]] of TRIPBOMB_WEAPON
|-
|-
|WEAPON_STANDSTILL
|WEAPON_STANDSTILL
|align="right"|'''2048'''
|align="right"|'''2048'''
|player should stop jumping
|Stops all player z-axis movement when firing
|-
|-
|WEAPON_SPAWNTYPE1
|WEAPON_SPAWNTYPE1
Line 73: Line 73:
|WEAPON_RELOAD_TIMING
|WEAPON_RELOAD_TIMING
|align="right"|'''32768'''
|align="right"|'''32768'''
|Alternate formula for reload sound timing (used for pistol reload sound timing)
|Alternate formula for reload sound timing, generally used for pistol
|-
|-
|WEAPON_RESET
|WEAPON_RESET

Revision as of 12:53, 20 April 2009

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

The flag values for WEAPONx_FLAGS are:


Name Number Description
WEAPON_HOLSTER_CLEARS_CLIP 1 Holster key "refills" magazine by removing excess ammo from the player
WEAPON_GLOWS 2 Controls glowing effect on SHRINKER weapon's crystal, no effect on other weapons, probably breaks shotgun if used with that weapon
WEAPON_AUTOMATIC 4 Enables additional logic for "automatic" weapons
WEAPON_FIREEVERYOTHER 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 16 Fires when kickback_pic % 3 == 0 (every third frame)
WEAPON_RANDOMRESTART 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 64 Use ammo per shot per burst (like the Devastator)
WEAPON_BOMB_TRIGGER 128 Is a bomb trigger (Pipebomb Detonator)
WEAPON_NOVISIBLE 256 Using does NOT cause player to flash the level (clear visibility)
WEAPON_THROWIT 512 Currently unused
WEAPON_CHECKATRELOAD 1024 Check weapon availability at 'reload' time, only affects weapons with WEAPONx_WORKSLIKE of TRIPBOMB_WEAPON
WEAPON_STANDSTILL 2048 Stops all player z-axis movement when firing
WEAPON_SPAWNTYPE1 0 Spawn Type 1 (Pistol shells)
WEAPON_SPAWNTYPE2 4096 Spawn Type 2 (Shotgun shells)
WEAPON_SPAWNTYPE3 8192 Spawn Type 3 (Chaingun shells)
WEAPON_SEMIAUTO 16384 Semi-automatic (cancel button press after each shot)
WEAPON_RELOAD_TIMING 32768 Alternate formula for reload sound timing, generally used for pistol
WEAPON_RESET 65536 Resets kickback_pic to 1 instead of 0 at end of firing animation if fire is held

WEAPONx_FLAGS is a bitfield, so you can add the individual flags together in the manner of cstat and orientation.