Hi every1, im having a problem with actor replication here.
I have an actor (a AI) that will use a “spell” and that spell will create an new actor (a buff).
The AI is spawned on World map so it is rulled by the server.
When i try to create the new actor (on spell BP) this new actor does not get replciated to clients.
As you can see, the Client detect that there is 1 element on the array but it is invalid… why?
All actors are replicated here.
Shouldnt the replicated actors created on server be replicated to all clients?
I guess it’s possible that the array change gets replicated before the new actor gets created on the client. You can never really depend on the order of things to replicate.
Also keep in mind that BeginPlay for the debuff will be called on the client as well so if you add the debuff to the client there it will get added twice (once from the server though replication) and once on the client itself.
Only the server is adding actors to the array, i will add another image so u can confirm it.
And i thought the BeginPlay for Debuff should be called on client as u said but for some reason it does not. I will add some prints to show you as well,
Anyway thank you so much for helping me, im really stressed with this.
Here i added a print to see if Begin play will be called on Clients:
Network Relevancy determines if a client should receive updates for certain actors. This is something that isn’t exposed much to Blueprints. In C++ you would overwrite the IsNetRelevantFor function to implement your own rules. For example actors that are too far away from the client aren’t relevant.
Dam… it was not always Relevant… i didnt knew it was needed
I thought it had something to do with replication effect range…
U are my hero… could u explain me why it need to be Always relevant? Solved my problem btw