Topic was automatically imported from the old Question2Answer platform.
Asked By
Redical
Hello!
I’m making a multiplayer 2D platformer (which I’m very proud of, by the way xD), and I recently added a multi-target follow camera from this absolutely amazing tutorial:
But then I wanted to add a system for joining the game manually, and then I realised if I wanted 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.
I’ve tried quite a few times, but each time I get an error basically saying that it hasn’t appended the children, just the parent node.
I don’t really know how to do this, so any help would be great.
Oh, cool!
Thanks!
I might actually do that, as now that I’m making my first game I’m discovering how important it is to actually optimize code, not just to make it run better, but also so that you can see what it does more easily in the future.
Thanks for the help!
Redical | 2023-01-09 22:03
Hehe let me tell You, very often optimizing the code will make it less readable !. And I believe readable code is almost always a better choice, unless your project actually framedrops
Inces | 2023-01-10 13:59
Ah, okay!
Good to know.
I suppose it’s a bit on what you prefer as well;
whether you prefer extremely optimized code as opposed to very readable code.
I’m not really experienced enough to have an opinion on that yet, but I definitely think I agree with you on liking when you can see exactly what the code does.