Hey everyone,
I have the requirement of showing a few assets for every other player in a networked environment, like an Avatar or player number on their head. I want to avoid to spawn anything for the local player, he doesn’t need to see anything from these about himself.
The spawn also needs to consider some attributes from the actual player, like menu configuration and such.
I can’t use OnStartClient, because it’s called on all of the instances and isLocalPlayer is not set at that point. There’s no OnNonLocalPlayerStart, so the furthest I could get was to use OnLocalPlayerStart and then execute a commmand rpc chain from there for all the others to receive the relevant data while ignoring that in the local player.
BUT what about players that join later, they won’t receive the rpc? So I used syncvars for them to get their actual state. But where do I read it or? In Start? In OnStartClient? I’m stuck here because there’s no combination that doesn’t involve running the spawn stuff twice for players that check their start and receive the rpc… How do I do this right?
Every nonlocalplayer should spawn stuff with information abhor the localplayer, but only once, meaning after OnLocalPlayerStart ran for the actual local player. I can’t think of a solution.