crafting finished?

Place to get help with not working mods / modding interface.
User avatar
Lutra
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Apr 01, 2016 9:22 pm
Contact:

crafting finished?

Post by Lutra »

is there a way to tell when an assembling machine has finished crafting? i haven't seen any events regarding it
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
ClayC
Inserter
Inserter
Posts: 24
Joined: Fri Nov 21, 2014 8:01 am
Contact:

Re: crafting finished?

Post by ClayC »

why would you need such an event?

Can you give us a scenario?
User avatar
Lutra
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Apr 01, 2016 9:22 pm
Contact:

Re: crafting finished?

Post by Lutra »

when you craft a rocket(not vanilla, my modded one) it launches automatically. i.e. there is an assembler for item small-rocket. when it finishes i want it to launch the rocket. i have all the other code sorted, but not the transition from when the assembler finishes crafting
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
Sean Mirrsen
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Apr 27, 2016 6:30 pm
Contact:

Re: crafting finished?

Post by Sean Mirrsen »

Lutra wrote:when you craft a rocket(not vanilla, my modded one) it launches automatically. i.e. there is an assembler for item small-rocket. when it finishes i want it to launch the rocket. i have all the other code sorted, but not the transition from when the assembler finishes crafting
There's no event to do it, but you can set up a watching script using the on_tick event that will check assemblers of your specified type for whether they have completed a project. If the finished rocket acts like an item in the inventory, you can just watch for it via get_output_inventory in that script, and do anything you need if it's there.
Post Reply

Return to “Modding help”