diff --git a/src/singletons/scene_reference.gd b/src/singletons/scene_reference.gd index e56e369..9bd8ae7 100644 --- a/src/singletons/scene_reference.gd +++ b/src/singletons/scene_reference.gd @@ -26,7 +26,9 @@ func _ready() -> void: sequence_actors.append([null, null]) func sign_up_for_sequence(callable: Callable, sequence_id: id, index: int): - # if this assertion fails, two objects tried to sign up for the same sequence or an empty slot has been missing. + if sequence_actors[sequence_id].size() <= index: + sequence_actors[sequence_id].resize(index+1) + # if this assertion fails, two objects tried to sign up for the same sequence. assert(sequence_actors[sequence_id][index] == null) sequence_actors[sequence_id][index] = callable