🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

I Can't have my player jump and shoot simultaneously, please help!

Started by
1 comment, last by fleabay 4 years, 3 months ago

I'm new to game development so i hope that it isn't too stupid. Also, i work with godot 3.2

The problem is that i can not hold left arrow + up arrow (jump) + space (shoot) at the same time, although right + up + space works just fine.

My physics process function goes something like this:

if (right_arrow pressed) : walk right

else if (left_arrow pressed) : walk left

else : stay idle

if (space just_pressed) : shoot fireball

if (up_arrow just_pressed) : jump

I imagine that something goes wrong at the else if. I have moved the shoot if in the beginning and the end of the process but it is the same. If any of you have any tips, I would really appreciate it.

Edit: Found it, space does not work with multiple buttons. I put tab and worked…

Advertisement

Alex, you weren't asking about Artificial Intelligence, so I moved the thread to a more appropriate forum.

-- Tom Sloper -- sloperama.com

alex6 said:
Edit: Found it, space does not work with multiple buttons. I put tab and worked…

You should put that closer to the top of your post. ?

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

This topic is closed to new replies.

Advertisement