Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Vicolaships |
My scene composed of a GridMap
and KinematicBody
:
- World
- GridMap
- KinematicBody (Player)
- MeshInstance
- CollisionShape
- Camera
I would like to check the GridMap
cells inside the Player
script:
extends KinematicBody
var grid_map
func _ready():
grid_map = get_node("../GridMap")
if grid_map.get_cell_item(0, 0, 0) == INVALID_CELL_ITEM:
print("Empty cell!")
The editor yelds an error Parser Error: The identifier "INVALID_CELL_ITEM" isn't declared in the current scope.
How do I “include” or “import” the GridMap
class to allow its use in my script?