Using buffered RPC's to create projectiles.

Options
Hey everyone,

I'm attempting to create projectiles that are locally controlled using buffered rpc's. It works correctly except when a new player joins the game, every projectile that was ever created gets spawned all at once. What is a better solution to fix this?

Regards,
Azura

Comments

  • Hi @AzuraSky,

    It works correctly except when a new player joins the game, every projectile that was ever created gets spawned all at once.


    This is because you buffer the RPC calls. If those projectiles 'acting like normal projectiles' (short lifetime for example) you don't have to buffer those RPCs calls because later joining clients don't need this information any longer, especially if the projectile is already destroyed.

    Another option you have is to use the RaiseEvent function which provides options for adding and removing buffered events. You can take a look at the Cached Events documentation page to learn more about event caching.