extends Node2D var playerAmount=2 var playerIndex=0 var objectName func _ready(): next() func next(): if playerIndex >= playerAmount: playerIndex = 0 objectName= "player%d" % playerIndex print(objectName) get_node(objectName).start() playerIndex += 1