EVENT PROCESSINPUT: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{EventTable|1=EVENT_PROCESSINPUT|2=player that executed the input|3=[[i|player->i]]|4=0 values}}
EVENT_PROCESSINPUT is a [[EDuke32_event_list|Game Event]].
EVENT_PROCESSINPUT is a [[EDuke32_event_list|Game Event]].


This [[event]] is called when the game processes input from the player. It can be used with [[getinput]] to check for particular button presses.
This [[event]] is called when the game processes input from the player, before any of the other input events.  


 
It can be used with [[getinput]] to check for particular button presses.
This can be used to completely prevent the player from using the mouse or other analogue devices to look around (for in-game cutscenes and such):
 
<pre>
onevent EVENT_PROCESSINPUT
getinput[THISACTOR].avel turning
getinput[THISACTOR].horz mouselook
 
ifvarn turning 0 setinput[THISACTOR].avel 0
ifvarn mouselook 0 setinput[THISACTOR].horz 0
endevent
</pre>
 
This example will completely prevent the player from turning around or looking up/down with the mouse.


[[Category:Events]]
[[Category:Events]]
[[Category:Input manipulation]]
[[Category:Input manipulation]]

Latest revision as of 14:04, 4 February 2022

Event ID player# THISACTOR RETURN
EVENT_PROCESSINPUT player that executed the input player->i 0 values

EVENT_PROCESSINPUT is a Game Event.

This event is called when the game processes input from the player, before any of the other input events.

It can be used with getinput to check for particular button presses.