How do I separate two objects only on the X?

I’m making an infiniti jumper in which the platforms are randomly generated, but sometimes they overlap, and I don’t want that to happen because it makes the platforms too big and some even ugly, and I don’t want to delete them when they overlap because that sometimes makes the platform too far away and impossible for the player to make the jump.

the event “separate objects” works fine, but there is anyway to make is separate only on the X of the object ?

There is no direct way but you can repeat 20 or more times,

  1. Separate
  2. Go back to original y

And it should give you a good result

1 Like

unfortunately this doesn’t work, and I forgot to mention that all platforms are the same object

Save the Y in object variables, use the separate object action, then constantly set the Y to its variable.

(The only not-complex solution I could think)


I couldn’t get it to work either, but I made some changes to the platform generation code and now I can just delete them without any major problems, and also thanks for answering me!

for each platform {

if (colliding with platform) {

variable platformY of platform = platform.y
separate platform from platform
platform.y = platformY