Questions about function replication

Tryedz
Wed, 12 Jun 2019 23:46:43 +0000
Platform & Builds

Okay, I just want to understand for sure how some replication stuff works, specifically with function replication.

1. How do they work when nested? If I have a function that is, say, set to Run on Server, and inside this function there is another function call, and this one is set to Not replicate, will it not replicate or will it inherit the setting of the “parent” function? If so, if I set it to anything other than Not replicate, will it use that setting or will it conflict with the parent? Is doing this sort of thing considered bad practice?

2. If, for instance, in Event Tick, I call a function that is set to Run on Server. The stuff that I execute in Event Tick after this function will not Run on Server, right?

3. Regarding Switch has Authority, if I want to make the client run something on the server, why would I need to use Switch has Authority instead of just replicating it to the server without checking if it has authority? Wouldn’t the result be the same?

I hope I could phrase these questions well enough, and thanks in advance.

3 posts - 1 participant