rendering.draw_sprite{..., time_to_live = 2} This works.
rendering.draw_sprite{..., time_to_live = 1} This doesn't.
[1.1.5] rendering.draw_sprite time_to_live has to be at least 2
-
- 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
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.
-
- 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
The way script rendering logic works is: decrement time-to-live, if 0 then it's dead, then render all non-dead rendering objects.yagaodirac wrote: ↑Wed Dec 09, 2020 5:47 amTo 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.
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.
- eradicator
- Smart Inserter
- Posts: 5211
- 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
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Fast Inserter
- Posts: 152
- Joined: Sun Jun 16, 2019 4:04 pm
- Contact: