Comparing key masks.
#3

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
Well I really didn't understand what you actually meant to say, your poor choice of words I guess.
But here's the thing, if you need to check if player is holding 2 keys combined, you can first combine them using |, then check it with &
PHP код:
if(newkeys & (keymask2|keymask3)) 
so you could check which key is being held with keymask2 so you could do different binds.


If thats not what you want please elaborate more or even put your current loop here so we could help you.
Didn't you get the point, that I got 2 Keymasks - the newkeys and the keymask2?

Player defines which keys are in the keymask2, it might even be all the keys or just one. So your suggestion doesn't work. If any of they keys that are found in keymask2 are pressed, the if statement is true and it doesn't require the rest of the keys and breaks the combinations (which is the point of this topic).

Looks like a loop is my best bet to get this working.
Reply


Messages In This Thread
Comparing key masks. - by [WSF]ThA_Devil - 31.08.2016, 12:38
Re: Comparing key masks. - by PrO.GameR - 31.08.2016, 13:23
Re: Comparing key masks. - by [WSF]ThA_Devil - 31.08.2016, 13:50

Forum Jump:


Users browsing this thread: 2 Guest(s)