Multiplayer replication issue

I have this part in an enemy animation blueprint :

In the server side it will always work, however, in the client side it will always returns null, no matter how many loops with delays i iterate on it. how am i supposed to get the pawn owner of this blueprint like that ? i’v tried to take this value and send it with events like “run on server” and then use “multicast” and still it was always null for the client.
Is it a bug? how do i fix that ? I’m using UE4.5.

Also, when i print stuff while playing with 2 players, the prints looks like :

server : hello
client : hello

But when i click on the “~” key, this is all gone, and these prints are sometimes useless if they go away too fast.
Is there a way to make them stay ?

Ok i’v just tried this one and it gives me the animation blueprint like it should, but for some reason i can’t assign the character to the animation blueprint.

Also the client is get null out of this node :
Is it a bug ? A multiplayer thing ? How do i fix that ? Anyone?..

Am i the only one with those issues?
Can anyone confirm that he did the same thing and it worked for him ?

Ok now i can say for sure that the AI Controller is not being replicated to the client.
Tick evets won’t occur in the client side. Is there any special thing that has to be done in order to replicate the AI Controller to the client ?
I have the replicate checkbox checked and also tried to apply it at runtime via the server side. Any idea ?..

Edit : Ok i’v solved the damned issue !
I had to check the “Always Relevant” Checkbox in the my enemy Controller blueprint :
And now things are working as it should for this enemy, at last! :slight_smile:

Hey Sahkan,

I’m glad you were able to work around the issue you were facing. I wanted to let you know, however, that generally the controller is not intended to be replicated. The controller is where you want to store your movement rules and inputs, while data and anything client specific should be done in either the player state or the player character. While this solution of manually replicating the controller might help you now, it could also cause problems with multiple replication later on. My suggestion would be to try moving all of this functionality that is client specific to the character instead.


I strongly recommend you look over these videos:

If you already have, go through them again. Watch them over and over until you really understand network replication. This is a difficult topic, and one of the more challenging programming concepts to understand in game development in general. There are engineers who do this as their living, so don’t feel bad if it’s difficult. There is also the network example scene that comes with the UE4 content examples project- look over that!

Can you better explain what you are trying to do? Don’t get into specifics, just in layman’s terms, what do you want to have happen right now?

Ben Halliday Thanks i will keep this in mind.
Jak Carver I just want the behavior i implemented to the enemies to work fo the client too, i’v started building this game with no thinking on multiplayer and probably made some mistakes with where implementing what ( Like Ben Halliday pointed ). But still, i don’t really like to change stuff that are already working, if it will cause problems later i guess i will have to change it anyways.
In this case i just want to see the animations of the enemies in both client and server.
So this time i’v already solved the issue.
( I’v actually seen these videos of network replications, all but the two of “Adding Networked Features to 3rd Person Template”. I just didn’t feel like they matter that much, i guess i will just watch them anyways just in case.