The following is a compass script we use. It is bound to the P key, and you can change that by altering the value of the scancodekey value. I run this in v1.17, v1.18, and v1.19 with no issues. Attach it to a triggerzone in the level.
;Artificial Intelligence Script
;Header
desc = Compass (press P key)
;Triggers
:state=0:state=1
:state=1,scancodekeypressed=25:compasson,compasspin,etimerstart,state=2
:state=2,etimergreater=250,scancodekeypressed=25:compassoff,etimerstart,state=3
:state=3,etimergreater=250:state=4
:state=4:state=1
;End of Script
I also thought the "keypressed" command was something like this:
keypressed=25 1 --> means the P key was pressed
keypressed=25 0 --> means the P key was released
I am only asking because I do not use that command, but still use "scancodekeypressed" command.
Twitter: @NFoxMedia