x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

what does "run on server" specific mean?

I know how to use "run on server" function in the pawn that possess by client controller. but how I can use it in other actors? should The actor be spawned on server or client? I tried both ways but looks like it didn't work? so does anyone know how to do it? or, can somebody explain the word "Target owned by invoking client" means in this page (https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Blueprints/index.html)

Product Version: Not Selected
Tags:
more ▼

asked Oct 20 '16 at 12:03 PM in Using UE4

avatar image

zhoudao200
41 2 6 16

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

1 answer: sort voted first

Run on server means that you are calling a function from a client and you expect the server to execute it. Run on server can only be used by autonomous proxys which is usually player characters and their controllers I think. On a multiplayer game, every actor should be spawned on the server if you want all the clients to see it. If you spawn stuff in a client, only the client that spawned it will see it. Target owned by invoking client refers to who is calling the RPC (Remote Procedure Call) in the client. It means that the actor who calls the function is owned locally, which is, in most cases, the player character of that client.

more ▼

answered Oct 20 '16 at 09:24 PM

avatar image

MacDx
600 17 9 32

avatar image zhoudao200 Oct 21 '16 at 01:05 AM

so I spawn the character on the "post login" when a client joined, but this character is owned by client ? I'm so confused

avatar image MacDx Oct 21 '16 at 01:15 AM

so I spawn the character on the "post login" when a client joined, but this character is owned by client ?

Yes. Player characters are owned by each client because each player is controlling his character so he is the owner of that character. To me that sounds intuitive.

I recommend reading these

https://udn.epicgames.com/Three/NetworkingOverview.html https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Actors/RPCs/

they helped me a lot to understand the concepts of unreal networking

avatar image zhoudao200 Oct 21 '16 at 02:12 AM

I finally figured it out, looks like I have to set the actor's owner to be the client's controller to use the "run on server" function normally.

avatar image MacDx Oct 21 '16 at 04:00 AM

Great to hear it's solved!!

(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