Topdown aim system with 8 directions

I want make a combat system like Crawl.

How I want to work: The character will use arrows to walk, when holding the attack button the character will stop to moving and starting using a aim mark to lead the direction what the projectil will be fired, the aim must be in 8-directions because this is a topdown game.

With that code in image I get the thing of stopping player, rotating the aim centered at player (aiming) using arrows.

The biggest issues was: the rotation only maintain until I press holding the arrow keys, so if I release the arrow before the shoot button the character won’t shoot to the ‘last position’ of aim mark.

I think if I can make the aim mark in the last position when aimed until I change that again I can make this work (at least for ranged skills).

I tried a lot of ways like using aim mark as a 8directional sprite but I cant make that work.

Please ignore A and S key is pressed commands and Idle animation, I just put in to not forget!

I am noob at both Gdevelop and game development, so sorry if this is a dumb question!

I’m a noob too but on one occasion I tried something similar.
Maybe you should try to create the player’s independent weapon (or just a small point as a reference) and by pressing the firing button DISACTIBATE the player’s BEHAVIOR and ACTIBATE THE weapon’s BEHAVIOR.

I will try to give you an example in a while but I don’t know if it will help because I think your gameplay is complex and I do not understand English very well and I am noob too
I would also like to know more. some help.

1 Like

here the example.

update example with shotting

1 Like


I will use that, I just need make some modifications.
I make some implements like a ‘Strafe’ so the ranged/casters can run away while still shooting in the same direction.

1 Like