Page 1 of 1

Assembly machine + creation event ?

Posted: Thu Apr 07, 2016 2:28 pm
by binbinhfr
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)...

Re: Assembly machine + creation event ?

Posted: Thu Apr 07, 2016 8:08 pm
by Adil
There's no such thing.
You'll need to occasionally check entity.crafting_progress intermittently to detect the item completion.

Re: Assembly machine + creation event ?

Posted: Thu Apr 07, 2016 8:50 pm
by binbinhfr
Adil wrote:There's no such thing.
You'll need to occasionally check entity.crafting_progress intermittently to detect the item completion.
Thanks for the idea, I didn't notice this interesting variable.
Finally, I check the content of the output inventory, it is also a good clue.

Re: Assembly machine + creation event ?

Posted: Mon May 23, 2016 2:18 pm
by darthun
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 ?