Detecting a key being held
#2

Because OnPlayerKeyStateChange is only called when a key is changed. If you press sprint OnPlayerKeyStateChange will be called, but it won't be called again until you release sprint OR you press another key in addition to sprint. Only the latter one will trigger HOLDING.

You will likely want to use PRESSED and RELEASED to set and unset a variable and/or timer.
Reply


Messages In This Thread
Detecting a key being held - by Denying - 18.08.2015, 17:44
Re: Detecting a key being held - by Vince - 18.08.2015, 18:04
Re: Detecting a key being held - by Denying - 18.08.2015, 18:14

Forum Jump:


Users browsing this thread: 1 Guest(s)