EVENT FIRE: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Doom64hunter (talk | contribs) mNo edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{EventTable|1=EVENT_FIRE|2=player that executed the input|3=[[i|player->i]]|4=1 value}} | |||
EVENT_FIRE is a [[EDuke32 event list|game event]]. | |||
The hard-coded [[gamevar]] [[WEAPON]] contains the variable for the player's current weapon. | 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]]. | See also [[EVENT_PRESSEDFIRE]] and [[EVENT_DOFIRE]]. | ||
[[Category:Events]] | [[Category:Events]] |
Latest revision as of 14:31, 4 February 2022
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.