This is a specific example for shooting in 8 directions by having 4 'shoot' keys, which, in different combinations, determine direction.
While not being exactly a common control scheme, in some situations this proves to be better than different schemes with single attack button, as it allows projectiles to be fired in directions independent from movement, essentially granting something similar to 'analog sticks' of gamepads.
Example is simple, well commented, and would be rather easy to implement.
Download GMK
Related posts:
Any chance you can update this to: Moving and Shooting in 8 directions using the arrow keys only…
Is there anything that prevents you from replacing keyboard_checks with what you desire?
i couldn’t open it, is it game maker 1.8? I use game maker 1 and 2
8.0 even, this post is old. Conveniently, I wrote a post on opening old projects in GMS.
The dropbox does not word. pls fix
Fixed.
I highly doubt this comment will be replied to, but with some tweaking couldn’t this turn into an 8-Directional movement system with four keys? I haven’t used Game Maker in quite a few years now, but that’s really my only reason to download this. To see what I can do by changing the code and (obviously) add in some animation for an 8 player directional movement.
Unless I misunderstood you, the example already implements that – you use WASD to accelerate the player in 8 directions.
You have some great, high quality examples for Game Maker here. I’ll be using a lot of these.