Last weapon: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
the value of last weapon used. Used if you switch to a weapon with no ammo, it will switch back to this weapon. Is set to -1 if there was no last weapon or if weapon change was succesful.
'''last_weapon''' is set to the currently selected weapon when the player attempts to switch to another weapon. While the ID of the weapon is changed the instant the weapon starts to change, the tile that is drawn on screen is only set after weapon_pos reaches -9, and during that moment last_weapon is used to store the tile of the last weapon.
 
See [[WEAPON]] for the list of weapon IDs.


[[Category:Player structure members]]
[[Category:Player structure members]]

Latest revision as of 21:22, 20 July 2012

last_weapon is set to the currently selected weapon when the player attempts to switch to another weapon. While the ID of the weapon is changed the instant the weapon starts to change, the tile that is drawn on screen is only set after weapon_pos reaches -9, and during that moment last_weapon is used to store the tile of the last weapon.

See WEAPON for the list of weapon IDs.