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"

What's the difference between these 2 replication methods?

The methods are in the images below. I wanted to know what is the difference between telling the server to multicast the change of the integer value - without the int being set to Replicated, and just telling the server to change an int, which is set to Replicated. -Both are causing the same effect I know this might be a simple question, but understanding basic stuff like this will help me a ton! Thanks!

alt text

alt text

Product Version: UE 4.18
1way.png (137.8 kB)
2way.png (56.7 kB)
more ▼

asked Jan 12 '19 at 04:15 AM in Blueprint Scripting

avatar image

78 11 16 19

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

1 answer: sort voted first

If the server is calling "Change Int" and the Int is replicated, then the server changes the int and just tells the clients about the changed int.

If the Server is calling "Change Int" and the int is not replicated, the "Execute on All" is called after, then the Server Changes the int value for the server and the "Execute on All" actually tells the Clients to also perform this Event. So the Execute on All is actually having each client execute that same event as the server. This is good for things like, if you have a Non-Dedicated host (a Player in game that is also the server) and that Server-player picks up and equips a piece of gear, he will be executing a "Run on Server" event called something like "Equip Armor" which is in reality just changing a skeletal mesh, depending on your setup. But no one except the Server will see this. So after the Server Runs the "Equip Armor" he will also call the "Execute on All" event of the same event, forcing each Client to execute the command of the Server Equipping the Same piece of armor so it forces the update on all clients.

This is good because when changing Skeletal Meshes on an actor that is already in the world, it only updates to the Owning Player. But forcing each client to make that same change will force the update to everyone and display the proper changes.

Sorry if the explanation is kind of crappy, It's just kind of hard to explain without demonstrating the events. Hope this helps!

more ▼

answered Jan 12 '19 at 08:43 AM

avatar image

236 2 5 5

avatar image Sntfon100 Jan 12 '19 at 02:47 PM

Awesome explanation! I think I've got the main idea of using Server to Execute on All. My only main problem now is the difference between setting the variable to Replicated, and not setting it to Replicated. Basically, I want to know if the first way (Where the variable is not Replicated) is kind of making the variable Replicated yourself, through the Server and Execute on All options, whereas if the variable was set to Replicated, then is it doing the Execute on All automatically? and kind of saving you making a Custom event of Multicast (Execute on All)

(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