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!

asked Jun 1 in Engine by kdenning (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)
answered Jun 1 by Andrea (519 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.