Search public documentation:
The temporary pattern is used when you have an actor that is predictable for all of its life time; except that it still needs to be initially replicated from the server to the client. This pattern only makes sense for client side actors.
This pattern is used in Unreal Tournament for projectiles. Projectiles such as rockets travel in a straight line at a constant speed. Thus, after the initial replication, where location/rotation/velocity and acceleration properties are transferred, it is perfectly fine to "disconnect" the server's version of the projectile with the client's version of the projectile since it is easy to predict where the projectile will be at any stage after that.
- bNetTemporary - This is set true as projectiles only need to be replicated initially, and then torn off.
- bGameRelevant - This is set true as projectiles are always relevant to the game.
- bReplicateInstigator - This is set true as the projectile Instigator variable should be replicated.
- NetPriority - This is set to 2.5 to have a higher network priority than other actors. However, in this case it only means that the initial replication will be done as quickly as possible.
- RemoteRole - This is set to ROLE_SimulatedProxy because projectiles should be simulated on the clients.
- As this is a pure simulation, if projectiles don't behave as a "fire and forget" type projectile, then they should not use the temporary pattern. This is because if the server later modifies its acceleration, location, rotation or velocity, these will not be replicated to client(s).
- As this is a pure simulation, don't make projectiles "instant death". This is because the projectile's simulation may be slightly off sometimes.
This pattern is useful for "fire and forget" type networked actors. Other than projectiles, other useful instances where this pattern can be useful:
- Single shot client side only effects that require some logic which can't be encapsulated by the particle effects.
- Transferring infrequent, single shot data to the client regardless of relevancy by using bAlwaysRelevant.