I have problems with the replication on my own computer because all the pawns are not spawned at the same time.
So I think that if this happens on my own computer through the network it will be much worse.
So I want to use a timer and replicate things after a certain amount of time to make sure everything replicates correctly. Is it a good idea to do it like this? Or…?
The thing is, I don’t know how long it usually takes for a pawn to appear on the player’s computer.
Could someone tell me an approximate average time?
Or any way to know for sure that all the pawns have appeared on the players computers? (That could be another valid solution)
You can’t approximate this. Don’t try to initialize the pawn in BeginPlay. Wait for all necessary properties to replicate and then do the initialization. You can use a timer to call a function repeatedly that checks whether all properties have replicated. Or you can use Rep_Notify.
It highly depends on “why” you want to control spawn time… if you simply want to make sure they are all spawned at the same time (not like one after another after half a sec or so)… then just display a black widget covering the whole screen until all are spawned properly.
At the moment it is only to change the skin of the pawn (the material). I have two teams, one blue and one red. I was spawning one by one. And changing their skin in that order. But some of the pawns do not perceive the change of skin of the others. I don’t know if it was because of the slowness or speed. So change the way to spawn the pawns. First I spawn them all and then change their skin.
FYI that delay you have in the middle does absolutely nothing as you don’t have anything connected to its complete pin. It won’t stop the sequencer from doing its thing.
Thanks… actually that’s good news.
That means restructuring the code fixed the replication problem…
I’m not comfortable with it anyway.
I will try your method.
thx u so much!!