EVENT DISPLAYWEAPON

From EDukeWiki
Revision as of 20:37, 28 July 2009 by Fox (talk | contribs)
Jump to navigation Jump to search

EVENT_DISPLAYWEAPON is a Game Event.

This event is similar to EVENT_DISPLAYREST and EVENT_DISPLAYCROSSHAIR in the fact that it is used to draw the HUD weapons on-screen. The only reason this is seperated from EVENT_DISPLAYREST and EVENT_DISPLAYCROSSHAIR is that this event is only run when view mode (a.k.a. F7 or DNVIEW) is off. You can use it to draw your own custom weapons to the screen that do not have the exact same tile set as the pre-set weapons. Remember to check the player's current weapon first and then, if it is the weapon slot that you want replaced, then put setvar RETURN -1 in your code.

The difference beetween EVENT_DISPLAYWEAPON and EVENT_DRAWWEAPON is that the second doesn't hide the quick kick tile. EVENT_DRAWWEAPON may be usefull for who doesn't plan to re-do the quick kick.