Help with key combinations

Hello, I’m back.

Is there a way to make simple control combinations?
I have a sprite that rotates according to which key is pressed. I have north, east, south, and west.
I need northeast, southeast, southwest, and northwest.

If you need a link, I can provide one.
Help.

-Ember.Y

Just use logic gates. If both the north key and the west key are pressed it will go north west.

1 Like

The simplest way is probably with Logic gates. There are other ways that are a bit better, but I’m busy with some stuff rn. If you want I can explain it later though

3 Likes

Would it waste your time if I asked for help?

Which one lol.

1 Like

Since you want it to happen if BOTH are pressed, use the AND gates.

3 Likes

Thanks a lot!

1 Like

I’m always happy to help, if I have time to help then it’s not being wasted. Just rn I’m busy doing a lot of different things

2 Likes

The AND gates will work for keyboard set to repeating, but warning for later, if you only want it to happen once then it takes a bit more code, since both inputs have to be frame perfect for it to output

2 Likes

Ok, thanks for the notice! I’m using repeating inputs.


Woohoo! Thanks everyone! This is epic!

Never mind, I re-fixed it. My code is completely messy, although I bundled as much as possible.