0 votes

Hi!

I have several terrains on my game and I want them to have a different walking sfx.
Here's the problem: I'm working with some layers of TileMaps, so how do I check in which tile is the player?

The way I'm working around it is to check with get_cell each layer, but I wonder if there's an easier way to do it.

Thanks!

in Engine by (14 points)

If you really need to pick your sound based on tiles on same coords from multiple tilemaps, I can't imagine easier solution than foreaching tilemaps, picking tiles in current coords and selecting a sound based on tiles you are walking accross.

You may allways prepare one layer for sounds only (by hand or via a code during tilemap loading), but I doubt it's going to be easier.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.