How do i change sound depending on which tile am i standing?

Godot Version



Hi. how do i change the sound depending on which tile i am standing on?
i am making 2d game and the floor is with tile map.
I can add audio but then it will be the same footstep for every type of ground
thanks for help and sugestions

when a tile is stepped on, call a function that cycles through a list of sounds. below is an example, when you press the space bar, it calls a function in another node that cycles through integers 1 - 9.

extends Node

@onready var m_cycle : MyCycle = get_parent().get_node("Cycle")

func _process(_a_delta):
	if(true == Input.is_key_pressed(Key.KEY_SPACE)):
		var v_value = m_cycle.ValueGet()

extends Node
class_name MyCycle

var m_value : int = 0

func ValueGet ():
	m_value += 1
	if(m_value > 9):
		m_value = 1
	return m_value