0

I'm trying to prototype a top-down shoot-em-up in game maker, but I've run into a critical flaw early on. I'm having trouble making instances of the player's bullet appear during the step event for the player object.

I have the prototype set up to where the player object moves towards the mouse. Whenever the player clicks the left mouse button, two instances of the bullet object should appear and shoot forward. If the player holds down the left mouse button, bullets should continuously appear. I've gotten the bullet instances to appear and shoot forward, and if the player holds down the left mouse button they continually spawn. However, the instances of the bullet object only seems to appear when the player is moving backwards.

What I have tried:

  • Disabling the fixed direction of the bullet object

The bullets still only appeared when the player object is moving backwards, only this time they flew to the right

  • Changed code in step event to Drag and Drop "Jump to point"

The bullets still only moved when the ship was going backwards.

  • Assigned a smaller variable to the bullet cooldown variable in the step event

I thought maybe I was just making the bullets spawn too slow, but again, they only spawned when the player object was moving backwards.

Attached is a few screenshots of my code, most of which is done in drag-n-drop. Help would be greatly appreciated.

Step event for the player object

Create event for the player object

Left mouse down event for the player object

Create event for the bullet object

Takune
  • 1
  • 1
  • Hi there. Could you please include relevant code in the text of the question itself? It'd be useful for us to be able to diagnose this more easily. – Brisbe Sep 26 '18 at 21:33
  • Hello Takune, I think it'll also be helpful to show an image, gif or video to describe better how the problem looks like. – Steven Sep 27 '18 at 06:16

0 Answers0