I am making a 2D platformer shooter (similar to metroid) and can't get the bullets to work properly.

From the Asset Store
Make your own spaceship game with this fully customizable set.
  • Whenever I shoot a bullet it travels at the speed it is meant to, which I have in set in the object properties and in a "on created" prompt, but for whatever reason whenever a bullet is created while another bullet exists (not destroyed yet) the new bullet travels at about twice the intended speed. I have made sure that the acceleration is 0 and think it may be a bug. Any help would be much appreciated as its driving me insane!

  • You need to post your project file or a screenshot of your events.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Im clicking the import image button and nothing is happening

  • Yeah, it's a bug on the forum. You can insert the image if you edit your own comment. Or use Imgur.

  • this should work

    imgur.com/a/YVEPyYP

  • It's just those three events that influence the bullet in the entire project, so you can ignore the other unless you may think it is influencing it for whatever reason.

  • I don't see any issues in the code. And you have an event that destroys the bullet if its speed >400, so bullets can not travel faster.

    Try running the project in debug mode, when second bullet is spawned, pause the game and compare both bullet instances - check that they are on the same layer, compare their speed etc. Maybe you'll find the problem.

    If this doesn't help, please share your project file. You can remove everything non-essential from it.

  • I have run the debug, everything is the same, even under speed it still lists 400, so I have no clue how this is happening. Do you mind telling me how to share the project file?

  • Are both bullets on the same layer? Maybe one is on a layer with a different scale and that's why it's moving faster?

    You need to upload the project to any file sharing service - google drive, dropbox, mega.nz etc.

  • They are on the same layer, the ONLY difference is the z order, however I noticed something odd just playing around. I have multiple guns to select from all with different objects as their respective bullets. When I delete the other gun's group(pistol), the one I am having issues with (rifle) is fixed. So I created a line that disables the pistol's group when the rifle is on screen. This fixes nothing oddly enough, so it is as if I need to completely delete the pistol and its coding from existence to fix the rifle's bullets. I will be able to share a edited project later, I need to turn in for the night now. Thanks a ton for your help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)