0 votes

Hi,

I am creating a multiplayer game where players join a lobby. When a player joins, I want a random Animated Sprite from a list to become their sprite.

I have a parent node I'm calling Party. Could I preload all the sprites in that node and then assign them to players as they join? I'm not sure the best way to go about this.

Thanks!

in Engine by (52 points)

1 Answer

0 votes

simplest solution that come to my mind: move the sprite around the game tree using

Party.remove_child(sprite_node)
Player.add_node(sprite_node)
by (528 points)

I like this idea. I think I could preload the sprites as PackedScenes and then add them as children to the Player nodes when the players join.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories