Advertisement

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

Started by April 01, 2020 10:54 PM
1 comment, last by fleabay 4 years, 7 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…

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

-- Tom Sloper -- sloperama.com

Advertisement

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