EVENT DISPLAYCROSSHAIR: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
BlasterDRP (talk | contribs)
mNo edit summary
 
m This actually has 3 return values
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
EVENT_DISPLAYCROSSHAIR is a [http://www.eduke32.com/wiki/index.php?title=EDuke32_event_list Game Event].
{{EventTable|1=EVENT_DISPLAYCROSSHAIR|2=[[screenpeek]]|3=[[i|player->i]]|4=3 values}}


This [[event]] is called when the player crosshair is being displayed.
'''EVENT_DISPLAYCROSSHAIR''' is a [[EDuke32 event list|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 <code>((160<<16) - ([[look_ang]] << 15))</code>.
 
:; userdef.return 2
:: Contains the y-position of the crosshair. The default is <code> 100<<16 </code>.
 
[[Category:Events]]

Latest revision as of 05:58, 4 February 2022

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 .