Page 1 of 1

Make combat-robot.time_to_live optional

Posted: Sat Aug 29, 2020 1:11 am
by DRT99
I would like to request that, if possible, time_to_live be changed from a mandatory property to an optional property for combat-robot entities.

I could set the value to several million ticks but that just seems like a band-aid / workaround that would force the game to keep track of a few timers that it doesnt really need to.

Re: Make combat-robot.time_to_live optional

Posted: Sat Aug 29, 2020 1:53 am
by sparr
in the mean time, set it to math.huge, not some arbitrary large number

Re: Make combat-robot.time_to_live optional

Posted: Sat Aug 29, 2020 4:41 am
by DRT99
Im guessing math.huge is just the maximum possible value?

Re: Make combat-robot.time_to_live optional

Posted: Sat Aug 29, 2020 5:09 am
by sparr
yeah. if you print it you'll get "inf", positive infinity.

Re: Make combat-robot.time_to_live optional

Posted: Sat Aug 29, 2020 7:04 am
by DRT99
So i just tried math.huge and got an error along the lines of "value is outside allowed range", so it looks like that is out and 999999999 is in for the time being

Re: Make combat-robot.time_to_live optional

Posted: Sat Aug 29, 2020 4:04 pm
by Rseding91
The game would still have to track each robot to see each tick if it had a time to live. It's a simple if in the robot update function and wouldn't just vanish if the robot was set to not expire.

Setting it to some large value is effectively the same so I don't see the point of this.

Re: Make combat-robot.time_to_live optional

Posted: Sat Aug 29, 2020 4:55 pm
by sparr
999999999 ticks is 4629 hours. Some people have games approaching that age...

Re: Make combat-robot.time_to_live optional

Posted: Sat Aug 29, 2020 6:07 pm
by Rseding91
sparr wrote:
Sat Aug 29, 2020 4:55 pm
999999999 ticks is 4629 hours. Some people have games approaching that age...
The game mentions the limits when trying to set the value to something out of the range. '999999999' isn't even close to the max it can be.
Capture.PNG
Capture.PNG (15.82 KiB) Viewed 1890 times