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"

Why do we need "run on owning client"? In the document illustration "not replicated" or "run on server" also works.

In the document illustration that shows "run on owning client", I found that I could make it work even if I change it to"not replicated" or "run on server". So what's the point of "run on owninng client"? Under what circumstance do we need it?

document: https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/Networking/ReplicateFunction/Blueprints/index.html

The third part(near the bottom) is an example using "run on owning client" to simulate inventory empty/ get item: alt text

After I change it to "not replicated" or "run on server", it still works: alt text

Product Version: UE 4.12
Tags:
more ▼

asked Oct 11 '16 at 03:24 AM in Using UE4

avatar image

FuTou
52 6 6 9

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

1 answer: sort voted first

Run on owning client functionality depends on who executes it.

Look at this chart from the RPCs documentation on the Client column

RPCs

alt text

So first we can see that Run on owning client pretty much only matters when you call it inside the server, because if you call it from a client it only affects himself which isn't different from any regular function.

Now, when you call it from the server, Run on owning client behavior depends on wether you are calling it for a Client-owned actor or a server-owned actor. The only client-owned actors are usually players controllers and their pawns. In this case you are executing the Add item inside (I'm assuming) the trigger box blueprint, which is a server-owned actor that is why you don't see a difference.

You would use run on owning client, for example to tell the client version of a player to set some variable that isn't replicated by default, like walking speed. Or maybe you would use it to execute a certain effect or sound that you want to happen only in one client.

Edit: I hope my answer helps! Tell me if you have any more questions!!

rpcs.png (37.9 kB)
more ▼

answered Oct 11 '16 at 09:16 PM

avatar image

MacDx
600 17 9 33

avatar image FuTou Oct 12 '16 at 11:07 AM

It's so perfect an answer! Thank you so much for getting me clear about this stuff!

(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