[1.1.5] rendering.draw_sprite time_to_live has to be at least 2

Bugs that are actually features.
Post Reply
yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

[1.1.5] rendering.draw_sprite time_to_live has to be at least 2

Post by yagaodirac »

rendering.draw_sprite{..., time_to_live = 2} This works.
rendering.draw_sprite{..., time_to_live = 1} This doesn't.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.5] rendering.draw_sprite time_to_live has to be at least 2

Post by Rseding91 »

Thanks for the report however that's just how it works.
If you want to get ahold of me I'm almost always on Discord.

yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Re: [1.1.5] rendering.draw_sprite time_to_live has to be at least 2

Post by yagaodirac »

Rseding91 wrote:
Wed Dec 09, 2020 5:43 am
Thanks for the report however that's just how it works.
To be honest, I didn't expect this to be intentional. I'll say it's a bug in my tutorial. But it does work well except for this.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.5] rendering.draw_sprite time_to_live has to be at least 2

Post by Rseding91 »

yagaodirac wrote:
Wed Dec 09, 2020 5:47 am
Rseding91 wrote:
Wed Dec 09, 2020 5:43 am
Thanks for the report however that's just how it works.
To be honest, I didn't expect this to be intentional. I'll say it's a bug in my tutorial. But it does work well except for this.
The way script rendering logic works is: decrement time-to-live, if 0 then it's dead, then render all non-dead rendering objects.

So if you start with 1 time-to-live you never render it because it dies the same tick it's created.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [1.1.5] rendering.draw_sprite time_to_live has to be at least 2

Post by eradicator »

Duplicate of viewtopic.php?t=75788 , which has more detailed explanations.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Re: [1.1.5] rendering.draw_sprite time_to_live has to be at least 2

Post by yagaodirac »

Rseding91 wrote:
Wed Dec 09, 2020 5:53 am
I really recommend you introduce more intuition in api. This detail is annoying with nothing good in return.

Post Reply

Return to “Not a bug”