HELP! Shooting in a Platform Game

hi everyone, i’m a total beginner and would like to add a Shooting ability to my player.
just a very basic horizontal Shoot like on old platform games.
can some one please explain the process in a very simple step by step way so even a total beginner can understand?
i would like to know:
how to create a shot and controll the speed and distance of it
and also how to make it hit and destroy the enemy.

i’m using Gdevelop 5.
thanks a lot I really appreciate the help!.

1 Like

Have a look at the tank shooter tutorial.
It will answer most of your questions :wink:

1 Like

Thank you that was very helpful!
but i still can’t work out a few things:

  1. the bullet dosn’t disappear after it traveled a while, it just goes on forever, how can i make it soot just a short distance and then disappear?

  2. when I face left, the bullet still travels to the right only, how do I make it shoot where i’m facing?

  3. is there a way to also have another kind of shot where the bullet is lobed in an arc and is destroyed when it hits the ground?

  4. how can i make the player display my shooting animation slower when i fire?, it shows it way too fast, you can barely see it, is there a way to slow it down so you can see the animation longer?

thank you soo much for your help! sorry for being such a noob :blush:

  • To make the bullet disappear, set a condition to check the X or Y position of the bullet and add an action to delete the object (bullet). Or you can use the Destroy Outside Screen behavior to delete the object outside the scene
  • Check this out: Tank shooter - Beginner tutorial [GDevelop wiki]
  • If you want a parabolic trajectory, you can add a force in the parabolic direction. Here’s an example: GDevelop 5
  • Go to behavior properties and increase the value beside the clock icon

    set-animation-speed
1 Like

It was very helpful, thank you :slight_smile:

Liking the post is enough, please do not necropost

This is a simplified way of making a bullet and firing it from the main character.


Remember to change the direction of the bullet you have to change the angle. In Gdevelop UP is 270°, DOWN is 90°, LEFT is 180°, and RIGHT is 0°. You can increase the firerate with the timer.