May 5th, 2012, 08:35 PM
I am currently making a small flood runner like game, I completed most of it, but I can't seem to get the jump action right. I got it to jump straight up and back down again, but it doesn't work when I use a left/right arrow key with it to perform a left/right jump.
The sprite goes straight up if I only press space.
What I want-
The sprites goes up and right or left when I press space while holding right or left.
"When ideas and actions fuse, they form creations"
May 5th, 2012, 08:44 PM
As you haven't said otherwise, I'm going to assume that you're using WinForms.
You would have to handle the KeyDown and KeyUp events so that you know when the user has depressed and released the arrow keys. You can then store their state in Boolean variables. When the user depresses the space bar you simply test those Boolean variable to know whether to jump left, right or straight up.
May 5th, 2012, 09:46 PM
Click Here to Expand Forum to Full Width
Survey posted by VBForums.