#procedural tilemap2d help

2 messages · Page 1 of 1 (latest)

icy moon
#

I have a tilemap2d I want to put tiles down with code(so there is always tiles around the player wherever he moves), and as far as I remember set_cellv was usefull for that in godot3. What do I use to achive the same with godot4?

example code :
` func createSpace():
const count = 10
var source = Vector2i(0,0)
for i in count:

cellpos.position.x = i

    for j in count:
        var cellpos= Vector2i(i,j) 

cellpos.position.y = j

tileMap.set_cellv(i,j,0)

        tileMap.set_cell(0, cellpos,0,source)˛  `
formal shuttle
#

it's still set_cell. what error are you getting?