EVENT FIRE

From EDukeWiki
Jump to navigation Jump to search
Event ID player# THISACTOR RETURN
EVENT_FIRE player that executed the input player->i 1 value

EVENT_FIRE is a game event.

This event is called every game tic while the weapon is firing and the primary fire key is held.

Setting the gamevar RETURN to any non-zero value disables firing the weapon. The hard-coded gamevar WEAPON contains the variable for the player's current weapon.

The difference between this and EVENT_PRESSEDFIRE is that setting RETURN to -1 does not unset the bitflag that indicates that the player has pressed the fire key. Some hardcoded effects (e.g. resetting knuckle_incs) will hence be executed despite the weapon not firing.

See also EVENT_PRESSEDFIRE and EVENT_DOFIRE.