How to make a top down shooter using arrow keys to shoot

I’m trying to make a game with a control scheme similar to the binding to isaac but i don’t know how to make the character fire immediately. I made it with a timer for the time in between shots but it the time also makes you wait before firing the first shot. How can i fix this?

2 Likes

Make it so that when the player fires, it adds one to a number block, then have a filter which is greater or equal to 2 as the filter. When that filter passes, make it off a switch and start a timer to on the switch :upside_down_face:

3 Likes

how would i reset the number block? and how would this work with up, down, left and right?

1 Like

Screenshot 2021-04-16 at 14.02.11
now the problem is if I hold right and up it fires a shot like this how can I fix this?
also thx @MelloJello your solution for the timer worked.

2 Likes

Make it so that all of the arrow keys have to go through switches and if one is held when another is held, the first one held off’s the other one and when you let it go it on’s it :upside_down_face:

1 Like

When one arrow key is pressed or the down output, it off’s all of the other arrow keys and when you left your finger from the key, or the up output, it on’s them again :upside_down_face:

1 Like

ok I found the problem the thing I’m using to make the gun rotate around the player is prioritizing right over up but the thing I’m using to shoot is prioritizing up over right how would I make them both prioritize one. this is causing what is happening in the picture

1 Like

As I said before, you can make a system where when one button is pressed it offs the other ones and when it is let go, it on’s them again :upside_down_face:

NVM i fixed it, i miswired it

Have the output of the switch off the other switches, not the key block directly :upside_down_face:

the problem in the picture is still occurring, here I’ll send pictures of both of the things I’m using


here is the thing I’m using to shoot


and here is the thing I’m using to rotate the gun

1 Like

Make the output of the switch off the other switches :upside_down_face:

1 Like

ohh I see what you mean sorry I thought you meant the output of the keyboard.

1 Like

everything but one thing has been mostly fixed. if I rapidly press two buttons then it resets the cooldown and imminently fires again do you have a fix for this?

1 Like

Have an and logic gate and link all of the keys up to the a and b input’s. If there are two pressed down at the same time, have it reset the timer :upside_down_face:

it’s not when two are pressed at the same time it’s when i press two keys separately at a fast pace

1 Like

It will count it as both of them at the same time if they are rapidly getting pressed :upside_down_face:

1 Like