-
key management in flash blows!
So I've found that if a person presses three keys at once flash only registers 2 of them most of the time. If the combination includes certain keys, like the UP key, then it won't work... is there any viable workaround to this?
What if someone in my game happens to be pressing up and left at the same time and then wants to shoot with the spacebar... it wont work!! Although I do not have diagonal movement, a player might still do it either by accident or just in preparation for moving up after moving left... this is a BIG problem... anyone have a fix?
Thanks!
Kyle
-
Senior Member
- The right of the People to create Flash movies shall not be infringed. -
-
Hype over content...
It's a keyboard issue rather than a Flash one.
Some keyboards can handle arrow keys and space, some can't. 'Fraid there's no better answer than that ( WASD and space works fine ).
Squize.
-
Senior Member
It's true different keyboards have different "key ghosting" problems, but how do commercial PC games get around this?
-
....he's amazing!!!
I can't think of a commercial game that relies on multiple keypresses... the mouse is nearly always half of the controls anyway.
-
....he's amazing!!!
It could also be that your logic is preventing more than two keys from being registered. I had this problem only this week, with certain cases being excluded from being tested because of a faulty if..then..else chain
I ended up writing my longest ever single line of actionscript to handle it.
Check this baby out..
Code:
pressed = Key.isDown(Key.UP) ? Key.isDown(Key.RIGHT) ? "NE" : Key.isDown(Key.LEFT) ? "NW" : "N" : Key.isDown(Key.DOWN) ? Key.isDown(Key.RIGHT) ? "SE" : Key.isDown(Key.LEFT) ? "SW" : "S" : Key.isDown(Key.LEFT) ? "W" : Key.isDown(Key.RIGHT) ? "E" : "none";
-
Senior Member
I don't think you can go around it with just software. Try holding down four buttons in any game and it won't work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|