Should I rewrite the variable to look like a function for it to work? That sounds like a very round-about way of doing things, so if anyone could propose a better solution, it’d be appreciated.
call() can only call functions, not scripts. To run scripts you would need to do something like this. Quite complex for what you’re trying to achieve.
I think you can write like this and probably throw away your genTelelist():
func _on_ItemList_item_selected(index):
var scene_path = levelData[index]
get_tree().change_scene(scene_path)
pause_game()
I was at first on similar path, but for some reason didn’t end up working. Seems your idea was still the correct and simpler way of doing things. Thanks for that.
This ended up working:
func _on_ItemList_item_selected(index):
var scene_path = levelData[index]
get_tree().change_scene(scene_path[3])
pauseGame()
pass
Also, thanks for the link. This might prove useful later!