Background repeated objects and Code

I asked about this in the discord server but I might as well post it here too. Can background repeated, as in the camera, objects not perform code, or am I doing something wrong?

Game: Flowlab Game Creator - survival

1 Like

Welcome! I think this is a bug.

Thank you for the welcome, I’ll talk to grazer about the bug if it is…

1 Like

No problem! grazer responds faster on Discord.

1 Like

I don’t understand what your asking, can you rephrase it?

Nvm, I understand now. The reason that the background does not repeat the code is that it’s just an image, there are no objects there. The beginning area has the objects so it works fine, but the rest of the map is just copying what the beginning area looks like, that’s why it shows the “Broken” animation.

But what I don’t understand is its doing the animation code but not doing the spawning @CodeAlpaca

1 Like

nvm, grazer has answered me :sweat_smile:

1 Like

The first tiles are doing the animation, so the rest are just copying it.

Ah ok, how would I be able to scrap my infinite generation then @CodeAlpaca?

1 Like

Maybe you could have an object in each corner of the screen, then send out a ray cast, if it hits anything do nothing, but if it misses spawn whatever the correct amount of tiles are. (It needs to be turned off when the camera moves, then when it doesn’t move turn it back on)

Now would I use an UI or just a normal onject in the game layer?

UI might be easier because you won’t have to adjust their position, they’ll just move with the screen. UI objects can’t have ray casts, but I think you should be able to import a ray cast anyways and it should work fine. If it doesn’t then it needs to be in the game layer.