Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

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

$
0
0

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 …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>