Download

Run on Server not working, can't seem to assign owning client

I just recently transferred code from my player blueprint to a seperate blueprint so that I can easily migrate my code from projects. What I am doing is spawning my new blueprint for each player, but I can’t seem to get my ‘Run on Server’ events to work from this new blueprint. All I really want is for my new blueprint’s replication to work the same as if it were in my player blueprint.

Currently I am spawning my blueprint from my character (for each character that I have), I am doing this on the server. After this, trying to do ‘Run on Server’ from my new blueprint does not work, nor have the other things I’ve attempted for the last few hours. I have looked all over the AnswerHub, but am not seeing how to set each current client to be the owning client of my blueprint, so that I can run the event. Is anyone knowledgeable in this area?

Edit: It turns out that if I re-parent my new blueprint to be a character, and then possess it, everything works fine due to character blueprints having built-in replication properties, which automatically set it to be the owning client. If I could find a way to have these same replication properties on an actor, that would work out great. Or if there is a way for my blueprint to accept input whilst not possessed.

Alright, I just ended up using a character blueprint, this is for a Chat System I’ve been working on. The only con to this is that I have to control input from somewhere else (Such as my actual character) by calling functions/events in my blueprint, since it won’t accept input unless it is possessed, which it never is.

I think depending on what was contained in the BP you could have used an actor component to achieve this, as components can be set to replicate.