I have a event where the camera will always follow the player, and I recently just added my tilemap into my project and gave it its own layer but there’s a problem, now my tilemap is also following my player wherever it goes, I tried changing the z order of the tilemap but its still following the player
This documentation could help
https://wiki.gdevelop.io/gdevelop5/tutorials/follow-player-with-camera/
I’m sorry but this did not help one bit.
It sounds like you are moving the camera on just the one layer, so the background/tileset doesn’t move on the screen.
You’ll need to move the camera of the tileset layer when you move the camera on the player’s layer.
This is the only event I have for the camera and nothing else
And as for the layer, I have everything on the base layer except for 2 layers which has a pop up text attached for an event
That player is moving condition with a start of scene condition is pointless. The former will only get checked once, when the scene first loads up. Then never again.
This contradicts what you wrote initially. So which one is it?
Oh sorry, i forgot to mention that yes everything but the tilemap and 2 other layers are on the base layer, and as for that player is moving condition, that’s just something I forgot to remove as I was testing something else the day before.
Ok, then you’ll need to move the camera for the tilemap layer and any other layers that should scroll when the player moves.
How do I do that exactly? because the camera event is the only thing that’s on the player
What you described is the problem. The tilemap isn’t moving with your player, the problem is that the tilemap isn’t movint at all and is dtaying static on the visible space.
Each layer has a unique an separate camera. Meaning id you have multiple layers you need multiple camera actions, one targeting each layer.
The base layer doesn’t mean “all layers”, its just the base one the scene starts with so you will need events targeting however many other layers you have created.