HOLDING Key_Fire doesnt work
#2

I'm just going to quote myself from another thread:

Quote:
Originally Posted by Vince
Посмотреть сообщение
The HOLDING macro is often used wrongly. What is usually desired is PRESSED and RELEASED. OnPlayerKeyStateChange is only called when a key changes. You can press and then hold KEY_FIRE for an eternity but it will still only register a press when you first press it and a release when you release it. Only if you press an additional while still holding KEY_FIRE will it register as holding.

You will need to set a timer when they first press the key and it and kill the timer when they release it. Alternatively, set and unset a variable and use OnPlayerUpdate if you require faster interaction.
Reply


Messages In This Thread
HOLDING Key_Fire doesnt work - by NeXoR - 05.03.2016, 22:20
Re: HOLDING Key_Fire doesnt work - by Vince - 06.03.2016, 08:22
Re: HOLDING Key_Fire doesnt work - by NeXoR - 06.03.2016, 17:33
Re: HOLDING Key_Fire doesnt work - by [XST]O_x - 06.03.2016, 20:10
Re: HOLDING Key_Fire doesnt work - by NeXoR - 06.03.2016, 21:33

Forum Jump:


Users browsing this thread: 1 Guest(s)