Does anyone know how to get the position of the tilemap grid where the mouse is located and save this information in a variable?
https://wiki.gdevelop.io/gdevelop5/all-features/tilemap/reference/#object-expressions
Use the expression with a set variable.
ObjectName.TileIdAtPosition(number, number)
Return the id of the tile at the scene coordinates.
But how can I get the positions and the grid of the tile that the mouse is hovering over?
I’m assuming you’re referring to the new tileMap object. You can use CursorX() and CursorY()
I added a text object for testing.
That’s right, it worked! Do you know if the tile map has any size limits? I want to create a large map without having to divide it into several parts.
I have no idea. I’m new to the tile map concept. I would guess whether there’s a limit or not, for efficiency sake, it might be a good idea to break things up a bit. You could run some tests with the profiler or check the FPS and see when things start to be affected. I don’t know how efficient tile maps are in general.