#Cell data layer not updating when being changed with set_cell

5 messages · Page 1 of 1 (latest)

summer mason
#

I am using a tilelayer to highlight tiles chosen for destruction by the ai, however only tiles that are placed in the editor have the "mineable" data while tiles placed with set_cell do not? Do I need to define the data a second time?

#
elif mode_state == BUILDING_MODES.BUILDING:
    var source_id = 0
    var atlas_coords = Vector2i(1,0)
    if retrieving_custom_data(tile_mouse_pos,placable_custom_data,ground_layer):
        tile_map.set_cell(visual_layer,tile_mouse_pos,source_id, atlas_coords)
#

This is my code for placing the grey tiles

#

This is my code that checks the data of the tile, the grey tiles placed before return true, while the ones places after, and white tiles return false

austere kernel