Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can I convert a reference to a class to a reference to a blueprint?

Hello, I'm starting to try using multiplayer for a game I am currently developing, but I'm struggling to get my characters owner. I have tried "get controller" but that only works for setting the server's controller and not the client's. I am now trying to get the game mode and get a reference to the controller from there. I can get access to the class but not a reference to the blueprint. Is there any way to convert this to a blueprint reference of my player controller? Or does anyone know a better way to get the controller of an actor at BeginPlay? alt text

Product Version: UE 4.10
more ▼

asked Jan 01 '16 at 09:52 PM in Blueprint Scripting

avatar image

6 2 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Player controllers are only replicated to the owning client. If you're trying to access the server player's controller on the client, that will never work.

Game modes are not replicated at all, ever, to clients.

Oh, and blueprints ARE classes. If you meant an object created from a blueprint, that'd be another matter.

more ▼

answered Jan 01 '16 at 09:55 PM

avatar image

1.7k 81 28 81

avatar image MGMaddMann Jan 01 '16 at 10:00 PM

Ahhh thank you for the quick response. This is helpful information for me as I am new to working with multiplayer.

avatar image TTaM Jan 01 '16 at 10:02 PM

You could try using player states, instead of player controllers. The "owner" of a player state is the player controller, if you need to do anything on the server side. That will still fail on the client side, though.

avatar image MGMaddMann Jan 01 '16 at 10:05 PM

Oh okay. I shall go back to the drawing board, and do some more research into multiplayer in Unreal then!

avatar image TTaM Jan 01 '16 at 10:07 PM


I made this a while ago. People find it helpful.

avatar image MGMaddMann Jan 01 '16 at 10:11 PM

Thank you! I can see why people find it helpful. That does help to explain it

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question