COND_InitialOnly replicates to newly connected clients?

Documentation about COND_InitialOnly says “This property will only attempt to send on the initial bunch”.

This means that the property is replicated only when the actor is created on the server, or it is also replicated to new clients when they connect and the actor was already created?

would like to know as well what InitialOnly means. What is initial bunch? Is it replicated only for a amount of time after the spawn of the actor? Is it only replicated once?

Good question. In practice this appears to repnotify all the time in editor, as though no condition was specified. Hardly a useful condition if this behavior is to be expected in a packaged game as well. What is the point of putting conditions into a replication engine if they are not used under the hood?

As I was in need of this condition, I made some tests.

The results are:

  • Only replicates once ever.
  • Will replicate to actors that join in late (the state of the variable on the server at the time the client joins). If the InitialOnly variable changes over time, clients joined at different times will get different values.

Open questions:

  • At what point does replication start? (before/after construcotor, before/after begin play)

I use COND_InitialOnly at the moment for properties that are exposend on spawn and are defined to never change. As I don’t know when replication starts, I would only use it for values like that.

1 Like

The variables value will have been replicated and ready to use already by the time the actor’s begin play starts.

I am 100% sure COND_InitialOnly variable values from server are not there when the OnConstruct() method is called.