Bizarre multiple key press issue.

Hello,

I'm hitting a very odd issue. I'm trying to make a top-down dungeon/quest type game, a bit like Gauntlet (retro is cool right now, right?!)

Anyway, I have a hero actor and I've set up 8 way directional movement for him using the arrow keys, so basic up, down, left and right - plus up/left, up/right, down/left and down/right for 45 degree diagonal movement. That works perfectly.

I tried to be clever and weapon function. So when you press (space) this produces a sword that swings in an arc in front of the hero in whichever way he is facing. Works great in all directions when the hero isn't moviing - i.e. no other keys pressed. Also works fine when user is moving up, down, left or right. But I'm having trouble with swinging the sword combined with diagonal movement. I'm getting really random behaviour. When I first tested it out it worked fine in all directions expect up/left. Pressing (space) when moving in this direction caused the hero to stop moving, and he wouldn't start again until the (space) key was released. After running a few times, checking the code for the up/left key combination, running it again, I figured it could be one of those odd GS issues that always solved by saving, closing GS, then opening it up again. Now, really strangely, Up/Right is the only diagonal direction that works properly with the sword swing. Down/left and Down/right are now behaving the same as up/left when (space) is pressed!

Update - Okay, I've fixed the problem! It seems to be something particular to using the spacebar is GS. I don't get the issue when I change it to the return key, or almost any other key. (shift) seems to cause the issue as well. How very odd!

Sign In or Register to comment.