EVENT CHANGEWEAPON

From EDukeWiki
Revision as of 09:42, 5 February 2022 by Doom64hunter (talk | contribs) (More misinformation, this event does not allow the modder to control which weapon the player is switching weapons to.)
Jump to navigation Jump to search
Event ID player# THISACTOR RETURN
EVENT_CHANGEWEAPON player that executed the input player->i 1 value

EVENT_CHANGEWEAPON is a Game Event.

This event is run when the player is changing weapons.

RETURN holds the number of the weapon the game is about to switch to, see WEAPON.

Setting RETURN to -1 will prevent the weapon switch, even when running out of ammo for that weapon.

Setting RETURN to -2 will allow the weapon lowering animation to play, but the player will still not be allowed to actually swap out the weapon.