Download

Call function after all actors are replicated

[SUP]Hello, I’ve set up a replicationinfo for my bots, and they are created and working fine (calling log functions on an iterator returns all of the replicated actors), but I can’t find a way to reliably add them to the post rendered actor array.
The postbeginplay of any local playercontroller/hud will be called BEFORE the actors are replicated to the client so I can’t add them into the array that way, and calling the function from postbeginplay of the actor is of course a nonstarter since it needs to be reliably added any time a player joins, not when the server starts.
I have been unable to find any method other than adding it into one of the main rendering loops, which of course is terrible since it is adding the actors every tick.
Is there really no reliable client function or event that will be called AFTER the game is fully ready? :([/SUP]

EDIT: I have an awful habit of solving my problems immediately after asking them. :frowning:
Didn’t take too long to figure out that I can simply replicate a function on postbeginplay() and since a local player controller is guaranteed when replicating, I simply use getalocalplayercontroller() and add it to the hud through that.

Thanks for sharing your solution :cool: