Error "None Accessed..."

Hi!

So I was working on an multiplayer project that has this feature that needs to determine the midle location of all players:

For that to work in the blueprint’s “begin play” I created the reference objects for the players:

and the reference object for a simple actor (just a small sphere component) to see if it’s working propely:

And in the tick event I made a script that sets the actor’s location acording to the number of players:

One thing to point out is that is working absolutely fine, but I’m still having this errors:

258040-im5.png

So I made print strings at the end of every reference object creation to check if the variables were set up correctly:

And all the “print strings” confirmed that all references where valid.
I want to know if there’s a way to fix this errors, despite of working perfectly, I want to make shure that they don’t cause any issues in the future.

Hello,

You can use array it will be better to see and more efficient I think.

Screenshot

Link to google drive with example Blueprint. Copy and paste to your project dir. (Do not drag and drop.)

Hope I was helpfull.

You can use cast to node to confirm that reference is ok.

Make sure you’ve got AllowTickBeforeBegin unticked.
It might be why. First run of Tick event gets empty variables and later they are set properly.

I tryed creating the objects with the array, for some reason it didn’t work. Thaks for trying to help.

But I discovered the reason for the errors:

258061-im1.png

This is the print string from the clients and the server (P1=Player1, P2="2, P3="3, P4="4, V=Valid, F=NotValid). As you can see all the clients have valid actor and player, but for some reason the server dosent have valid players.
Can you help me making them valid for the server?

How do you spawn the players? Do you need to run this function on all players and the server or can you just run it on the server and replicate the middle vector? Are the player actors replicated?

From the part of BP visible on screenshots it may be extremaly hard. Can you give me whole BP?

The players are spawned by a “NetworkPlayerStart”.

The player actors are replicated.

This function runs on a camera actor that is placed on the map and is the view target for all players. I just need the camera to have this middle vector and be centred acording to the position of the players. (I think it would be better to run only on players, but I would like to hear your opinion)

https://drive.google.com/open?id=1gqYqwiKWf_bjlMCoGkldUetrAE-0cvvV

I have an idea.

It may be because it’s Camera which isn’t realy intended to be replicated.

It can’t be. It’s just an actor that happens to have a camera component.

Sorry that was stupid, you are right.

But can you try to set this loop first then when it completes use set view target and destroy actor? This blueprint doesn’t work for me and I don’t wanna fix it as I will possibly change it.

Are you replicating variables?

I’ve set the player variables to replicate, still having the errors.
And why is not wrking for you?

I’m not shure if I understood what you mean.

By the way I’v also discovered that if i run on dedicated server all players are invalid, but if I don’t run on dedicated server “player 0” becomes valid and it’s the only one. I think that the server is having trouble finding the clients characters.

What about trying to set loop first and then rest?

And I’ve currently only source build.