(SOLVED) X Offset Bug for the Object Spawner Extension

I think I found a glitch with the Change the X Offset of the Object Spawner. The glitch is that the object either won’t spawn or is spawning somewhere offscreen.


The idea is that the object would spawn above the player as a hazard that follows him. This worked perfectly when I programmed it a month ago, but after the newest update, it’s not working, now. The Y offset for the extension seems to work okay, just not the X Offset.

Before reporting this, I made sure to try the usual tactics like exiting and restart GDevelop, restarting my computer, and retyping the piece of code to see if those worked, but they didn’t.

Hmm, I’ve never used that spawner, but I don’t think that you are using this action properly.
I looked at the extension events and the X and Y are built the same way.
I assume that the Y seems to be working for you, because your player’s Y doesn’t change.

Here’s what I recommend:

  • set a variable as your offset,
  • display the variable in a text object,
  • make it so that you can increase/decrease the value of the variable with keyboard keys.

This should help you see the effect of the action and understand how this offset works.

Cheers

Hi Gruk, thanks for waiting for my reply.
The Y position of the player does change when they jump. When I used the Y offset, it seemed to work because if the player jumped, the object’s Y position when spawned would change with no problem.

I also used your method and found the problem. Turns out, when the chandelier object spawns, it spawns waaaaay to the right of the player character. I’m not sure why that is, since I’ve checked and shrunk the collision boxes of the Chandelier spawner, the Chandelier, and the Player, but I was able to get it to spawn over the player character by adding the -/+ # of pixels to the Change the X Offset action.

Not the ideal way of solving it, I’ll admit, but I got the mechanic to work, so I’m good with how it works for now at least.