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. 

"Run on server" replicated event is called from non-owning server

Hello. I have been using replicated custom events in my PlayerController Blueprint to send messages between client and server.

The "Run on server" option for event replication updates the node label with the text "Replicated to server (if owning client)" which made me presume that the event is not sent to the server if the node is executed on a client that doesn't own it.

However, the server's version of a client's Controller is executing this node and calling the event (on itself) which I didn't expect to happen, so I've had to branch it with Is Local Player Controller for now.

This may be intended as it isn't actually replicating if the server is calling the event on itself, but it wasn't what I expected.

Can anybody explain?

Product Version: Not Selected
more ▼

asked Apr 04 '14 at 07:02 AM in Blueprint Scripting

avatar image

460 46 50 70

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

1 answer: sort voted first

Hi Acren,

When the server calls "Run on server" events, there is no replication involved so any rules involving replication don't apply in this case. I suppose the wording could be improved to reflect that.

If you need any more clarification please ask away :)

more ▼

answered Apr 04 '14 at 12:41 PM

avatar image Acren Apr 04 '14 at 02:07 PM

That's what I figured, thanks for clearing that up.

avatar image Mattboyguy Jul 02 '14 at 02:51 AM

I believe I am having this problem - but have not figured out a way to get around it. I have a box in a BP with a window mesh. The box extends out some distance from the window mesh so that a player can easily stand inside the box. When entered it sets a bool variable to checked. Then, I have a line of logic that states, when 'B' is pressed and in the box, SpawnActor. The problem is, when I set the custom event to 'Run on Server' (as this is game play vital) nothing happens when testing with the client - there is no spawned actor. In fact everything after the custom event does not fire. On the other hand, everything fires correctly and the actor is created when using the server preview window. Is this because the box is trying to call the function and not my character?

A few screen shot of the BP for clarification. http://i.imgur.com/TbWgPZ6.png http://i.imgur.com/YqNCTlJ.png

Thank you very much to anyone that can provide assistance.


EDIT: The nodes in the second picture between branch and spawnactor are connected in the version I tested.

(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