#How to check if a node is on a tile?

2 messages · Page 1 of 1 (latest)

sacred steeple
#

How to check if a node is on a tile? For example, how to check if the player is on a grass tile or a dirt tile?

torn tartan
#

Check out the functions local to map and get_cell_atlas_coordinates. The first function will give you the player position in map coordinates. You can then use the player position (which will be the same as the position of the tile it is on) to get the atlas coordinates of the tile the player is on. Your atlas coordinates will tell you if it is a dirt tile or a grass tile