EVENT PROCESSINPUT: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
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. 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]] |
Revision as of 04:00, 17 June 2010
EVENT_PROCESSINPUT is a 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 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):
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
This example will completely prevent the player from turning around or looking up/down with the mouse.