EVENT DISPLAYCROSSHAIR

From EDukeWiki
Jump to navigation Jump to search
Event ID player# THISACTOR RETURN
EVENT_DISPLAYCROSSHAIR screenpeek player->i 3 values

EVENT_DISPLAYCROSSHAIR is a Game Event.

This event is called when the player crosshair is being displayed. If it is disabled, the event will not execute.

Gamevar RETURN is set to the crosshair's picnum. Modifying this value will allow the game to handle positioning duties itself, etc. Setting RETURN to -1 disables hardcoded drawing of the crosshair completely.

See also EVENT_DISPLAYPOINTER.

Return Values

It is possible to change the tile, as well as the position of the crosshair.

userdef.return 0 (RETURN)
Set to the crosshair picnum, default is 2523. Change this to alter the crosshair sprite displayed onscreen.
userdef.return 1
Contains the x-position of the crosshair. The default is ((160<<16) - (look_ang << 15)).
userdef.return 2
Contains the y-position of the crosshair. The default is 100<<16 .