Simple control problem...why does this happen?
Blitz3D Forums/Blitz3D Programming/Simple control problem...why does this happen?
| ||
Ok, this is the rough and very crude movement code I'm using at the moment: Now, it works perfectly...except for one thing. When moving backwards and turning, it works fine, but when moving forwards and turning, you can only fire when turning right. Trying it while turning left results in the computer beeping to tell me too many keys are held down (though, like the other cases, there are only three keys down). Can anyone make sense of this? It's so simple, but it's quite a showstopper... |
| ||
Try putting a FlushKeys in there, maybe. |
| ||
That's PC keyboard stuff, not sure what keydown(57) but ctrl, alt and shift are specials that work well with other key combinations. There's nothing you can do about it (as far as I know), you've just got to use 'special' keys. |
| ||
Crappy keyboards strike again. This is nothing to do with Blitz, this is what crappy keyboards do. You need to offer the ability to customize the keys as you'll normally find that three keys is only a problem if they're both on the same part of the keyboard. Sadly, this will vary a bit between keyboards, but the only real "solution" is to use different keys. |
| ||
Didn't work...plus, it gets wierder. I swapped the order it checks for turn direction, and in game there is no visible change whatsoever. It seems to just gunk up when turning left while going forward, regardless of what order it checks the keys in. |
| ||
Crap...I changed it from space to control and now I can shoot while using any movement/turn combo. That really screws up my planned controls, which I could have sworn I've seen before. *Edit* I downloaded EV Nova, a game that uses the same controller setup...it indeed does plague that game as well. I'm glad it's not a Blitz problem...though it IS very annoying. Oh well, going to have to be more creative with the keyboard setup. |