duplicate constants
lstep opened this issue · 1 comments
lstep commented
For example, just importing it, and then clicking on the "Run Project" icon, doesn't work because of an error (I already reported) where you define two times the IDLE constant (in two enums in res://content/demos/attacks/characters/weapon/sword.gd
) exactly on https://github.com/GDquest/godot-slides/blob/0970fb89a04ce0202faef33d72a360198437ddf7/godot-3-presentation/content/demos/attacks/characters/weapon/sword.gd#L5
:
extends Area2D
signal attack_finished
enum STATES { IDLE, ATTACK }
var state = null
# Registering input before the attack ends
# Also common in platform games or for jump mechanics.
# You register the next jump before the character hits the ground
enum ATTACK_INPUT_STATES { IDLE, LISTENING, REGISTERED }
var attack_input_state = IDLE
NathanLovato commented
Are you using Godot 3.1 or something? It works no pb here: enum values are members of the enum (STATES.IDLE, STATES.ATTACK). Anyway fixing this now, and adding you as a commit co-author. Thanks for the report!