Hi,
I created an entities derivated from the assembly-machine-2, with a fixed recipe and I would like to detect when this machine creates an object.
How would you do this ? I did not find any event triggered in this case (creation event seems to be triggered only when the player creates something manually)...
Assembly machine + creation event ?
Assembly machine + creation event ?
My mods on the Factorio Mod Portal
Re: Assembly machine + creation event ?
There's no such thing.
You'll need to occasionally check entity.crafting_progress intermittently to detect the item completion.
You'll need to occasionally check entity.crafting_progress intermittently to detect the item completion.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: Assembly machine + creation event ?
Thanks for the idea, I didn't notice this interesting variable.Adil wrote:There's no such thing.
You'll need to occasionally check entity.crafting_progress intermittently to detect the item completion.
Finally, I check the content of the output inventory, it is also a good clue.
My mods on the Factorio Mod Portal
Re: Assembly machine + creation event ?
it's a shame, I could have used such an event as well.
Is there a way to call a script from the "stuff" defined in entity.lua, item.lua, and such files ?
Is there a way to call a script from the "stuff" defined in entity.lua, item.lua, and such files ?