Blockland Forums > Modification Help
Projectile with infinite lifetime?
Zloff:
--- Quote from: Demian on May 29, 2011, 06:02:07 PM ---And the projectile would still retain it's speed and such? Is someone able to provide me with such code to copypaste since I am no scripter?
--- End quote ---
It would be easier to just have it set to some really high number, but why would you want projectiles with an infinite lifetime? Too many of those projectiles at once could cause lag
Iban:
--- Quote from: JamestheLeet on May 29, 2011, 06:46:19 PM ---If it had infinite lifetime, it would crash the game if you aimed it to the edge/sky of slate.
--- End quote ---
Er, no. That's with raycasts.
The problem with infinite projectiles is that there is no clean up. ever. If your projectile is cast out into the void it remains on your RAM and is instantiated on all client's computers (and all new clients that connect) far, FAR after it serves any purpose.
Setting the projectile to a very long life (even if it's like 3 minutes long) is still infinitely better than infinite life.
Demian:
--- Quote from: Iban on May 29, 2011, 08:52:50 PM ---Er, no. That's with raycasts.
The problem with infinite projectiles is that there is no clean up. ever. If your projectile is cast out into the void it remains on your RAM and is instantiated on all client's computers (and all new clients that connect) far, FAR after it serves any purpose.
Setting the projectile to a very long life (even if it's like 3 minutes long) is still infinitely better than infinite life.
--- End quote ---
I am aware of this, but my uses for it are not exactly ordinary. Perhaps someone could answer this too?
--- Quote from: Demian on May 29, 2011, 02:08:02 PM ---What is the maximum lifetime for a projectile?
--- End quote ---
Chrono:
It will tell you the max in the console when you try to set it too high.