Pressing two keys at the ame time.
- KuchiyoseRashomon
-
KuchiyoseRashomon
- Member since: May. 7, 2007
- Offline.
-
- Forum Stats
- Member
- Level 26
- Animator
Hello newgrounds users, anyways my question is, how do I press two keys and make my character move in a diagonal movements (Like up left or up right etc) no worries on the animation part, its just the coding side, I tried using:
if (Key.isDown(Key.UP && Key.LEFT)) {
_y -= 2;
_x -= 2;
gotoAndStop("UPLEFT");
}
But it doesn't respond, no errors pop, so any suggestions?
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
At 3/22/09 07:38 AM, KuchiyoseRashomon wrote: if (Key.isDown(Key.UP && Key.LEFT)) {
if (Key.isDown(Key.UP) && Key.isDown(Key.LEFT)) {
- KuchiyoseRashomon
-
KuchiyoseRashomon
- Member since: May. 7, 2007
- Offline.
-
- Forum Stats
- Member
- Level 26
- Animator
Yeah fixed, cheers Denvish :D


