I’m playing around with Paper2D and thought, hey, why not try to make a fun cooperative platformer! So I started investing my time in watching the network tutorials in one go and immediately afterwards I started implementing it into the Paper2D project with some temporarily borrowed graphics from “Kenney.nl Platformer Pack”. What I’m trying to accomplish however, does not give me the expected results.
Basically, I’m trying to set player sprites at the beginning of the game (Begin Play event under “My Character”). I thought it would be as easy as just adding a “Switch Has Authority” and set the different sprites for the server and client.
The client see itself as a pink alien and the server as a blue alien (expected). The server however, see both itself and the client as a blue alien and I guess this is because the sprite change of the client only happens on the client-side (kinda obvious).
I’m unsure on how to go on about this in blueprint. If I think in code I would check how many players are in the server, then go through each one of the connected players class and set a color, then send that color information to all clients and it should work.
If I think like that in blueprint, I would setup a custom event with multicast and run as authority and then get the number of connected players (GetCurrentPlayers?), then go through each of them and set the sprite accordingly (SetFlipBook). However, I’m not sure how to use SetFlipBook and point it towards a specific client - right now “target” is set to the sprite inside the MyCharacter and does not point towards a client->mycharacter->sprite.
Maybe I’m just overthinking everything, maybe there is a hell of a lot easier way to do this in blueprint. I’m all ears, help :P!
Included a screenshot of the failed attempt for the lulz!