Author Topic: Projectile with infinite lifetime?  (Read 568 times)

I tried -1 but it didn't work. Can this be done? What is the maximum lifetime for a projectile?

It cannot be done, however, you could just schedule it to recreate itself when it's lifetime ends.

What is the maximum lifetime for a projectile?
Try 999999.

It cannot be done, however, you could just schedule it to recreate itself when it's lifetime ends.
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?

If it had infinite lifetime, it would crash the game if you aimed it to the edge/sky of slate.

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?
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

If it had infinite lifetime, it would crash the game if you aimed it to the edge/sky of slate.
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.

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.
I am aware of this, but my uses for it are not exactly ordinary. Perhaps someone could answer this too?
What is the maximum lifetime for a projectile?

It will tell you the max in the console when you try to set it too high.