# How do i emit particles off a specific tile on a generated tilemap?

Attention Topic was automatically imported from the old Question2Answer platform.

Here is my code for map generation. I want to make particles emit from
Dirtwall to produce a smoke-like effect from them. I’m considerably
far in my game development, but the further I get, the more confused I
am(guess thats learning, though.) How would i do this? I have a
particle scene ready to call but even then I don’t know how i would
specifically set EACH particle on each Dirtwall generated.

func make_map():
#core of map floor / rock
for x in range(1, current_map_size.x - 1):
for y in range(1, current_map_size.y -1):
var num = rand_range(0.0, 100.0)
if num < percentage_floors:
set_cell(x,y, TILES.Wispfloor)
else:
set_cell(x,y, TILES.Dirtwall)
#Rockborder set L/R Sides
for x in [0, current_map_size.x - 1]:
for y in current_map_size.y:
set_cell(x, y, TILES.Dirtwall)
#Top n Bot Sides
for x in current_map_size.x:
for y in [0, current_map_size.y - 1]:
set_cell(x, y, TILES.Dirtwall)
func smooth_map():
#
for x in range(1, current_map_size.x - 1):
for y in range(1, current_map_size.y - 1):
var number_of_neighbor_walls = 0
for direction in neighbor_dir:
var current_tile = Vector2(x,y) + direction
if get_cell(current_tile.x, current_tile.y) == TILES.Dirtwall:
number_of_neighbor_walls += 1
#check if we should change tile based on neighboring tiles
if number_of_neighbor_walls > 4:
set_cell(x,y, TILES.Dirtwall)
elif number_of_neighbor_walls < 4:
set_cell(x,y, TILES.Wispfloor)