Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Redical |
Hello!
I’m making a local multiplayer 2D platformer (which I’m very proud of, by the way xD), and I recently added a multi-target follow camera from this weirdly amazing tutorial:
But then I wanted to add a system for joining the game manually, and then I realised to do that, I’d have to make an array containing all the current players and then append all of those to the “targets” list in the multi-target camera’s script.
Here’s the code:
for _i in $Players.get_children ():
print (_i)
$MultiTargetCamera2D.targets.append(Players)
…Then the error basically says it’s appended the “Players” node and not the children of it (the actual players).
I don’t really know how to do this, so any help would be great.