Detecting if a key is pressed despite of other keys in GetPlayerKeys (Not OnPlayerKeyStateChange)
#1

Hello all,

I need to detect if KEY_SPRINT/KEY_WALK is pressed on callback 'OnPlayerUpdate' despite of other keys.

Example:
I press KEY_SPRINT and KEY_FIRE at the same time. I call 'GetPlayerKeys'.
How can I check if KEY_SPRINT is pressed despite of the rest of the pressed keys?
Reply
#2

Maybe with: if(keys & KEY_SPRINT)
Reply
#3

Exactly this. Why didnt you even test it, before doubleposting?
Reply
#4

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Exactly this. Why didnt you even test it, before doubleposting?
Well, because I can't test now

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)