Vaei:
[USER=“434”] XaVIeR[/USER] I have a scenario that I’d like your input on regarding the plugin
Huge world, many players in the vicinity of each other on a dedicated server. So we’d like to use it to help with the cost of spawning projectiles.
When looking at your plugin what occurs to me is to rate each gun in the game based on how many projectiles it can possibly have in the world (based on its fire rate, projectile lifetime, clip size/reload time, etc).
Then spawn that many for each player; when a player is loaded in so is his object pool. When a player loads out, each object is randomly generated a new lifespan between ~1-15 seconds (to prevent it unloading a ton all at once).
Does that sound realistic? Is there a better way to achieve our goals?
Cheers
This is a clever idea!
You could get the array of all objects in the pool and for each object set its lifetime = object index.
There’s function to get the array in pool component.