A_WeaponReady

From ZDoom Wiki
Jump to: navigation, search

A_WeaponReady [(int flags)]

A_WeaponReady is responsible for weapon bobbing and checking the fire keys and weapon changing keys. This function should be called in a weapon's “Ready” state so the weapon can be fired. The function can also be called in other states to allow a player to re-fire at any point.

In case parts of this behavior are undesired, the following flags can be used:

  • 1 (WRF_NOBOB): The weapon's HUD sprites will not bob.
  • 12 (WRF_NOFIRE): The weapon will not be made ready for firing (same as WRF_NOPRIMARY|WRF_NOSECONDARY).
  • 2 (WRF_NOSWITCH): The weapon will not be made ready for deselection (and so cannot be switched off).
  • 4 (WRF_NOPRIMARY): The weapon will not be ready for its normal fire.
  • 8 (WRF_NOSECONDARY): The weapon will not be ready for its alternate fire.

Examples

Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.
Personal tools
Namespaces
Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox