Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | alforiumstudios |
Hello, everyone!
I’m having an unexpected issue with the latest alpha release (Godot 3.1 alpha 3) and I’d appreciate some input. Up until now, I’d been able to use enums just like this:
- Script A (worldmap_grid.gd):
extends TileMap
enum ENTITY_TYPES {PLAYER, NPC, MARGIN, DOOR, DESTRUCTIBLE, INDESTRUCTIBLE, COLLECTIBLE, CHEST, FLAG}
(rest of the script)
- Script B (which is a child of A):
func _ready():
grid = get_parent()
type = grid.DOOR
This used to work fine, up until 3.1 alpha2, but now on alpha3 I get this error message: Invalid get index ‘DOOR’ (on base: ‘TileMap (worldmap_grid.gd)’). Suddenly, the link is broken. I don’t know why this happens. Is it a bug? Has there been a change in GDScript syntax? How do I solve this?
I’d really appreciate any help or ideas in this regard Thank you!