Entity enable/disbale to generate lua event
- Sandman2003
- Long Handed Inserter
- Posts: 67
- Joined: Sun Nov 30, 2014 5:02 am
- Contact:
Entity enable/disbale to generate lua event
I would like to be able to define an event that will trigger based on a (definable) entity type changing status from enabled to disabled or vice versa via in game circuit network conditions. Currently (as far as I can see), this has to be done by an on_nth_tick function that checks current status versus prior status, so an actual lua event could greatly improve mod performance versus this method.
My Mods - Space Extension Mod (SpaceX)
- Train Supply Manager
Sandman2003 is forum name for LordKTor
SpaceX Extreme mode factory
Rocket Launch every second factory(ie 60rpm) - Bobs mod based
- Train Supply Manager
Sandman2003 is forum name for LordKTor
SpaceX Extreme mode factory
Rocket Launch every second factory(ie 60rpm) - Bobs mod based
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Entity enable/disbale to generate lua event
So basically a completely new prototype whichs sole purpose is to raise an event when it recieves a hard-coded (or better runtime determined?) circuit signal?
I guess that could be pretty useful for multi-entities with heavily customized behavior too. Would also make it possible to have "on/off" switches for basically any entity.
I guess that could be pretty useful for multi-entities with heavily customized behavior too. Would also make it possible to have "on/off" switches for basically any entity.
Re: Entity enable/disbale to generate lua event
This currently isn't possible because the entire circuit network doesn't use events. The network operates by checking the signals each tick to see if the current condition is satisfied and if it is it operates. If not, it doesn't operate.
If you want to get ahold of me I'm almost always on Discord.
- Sandman2003
- Long Handed Inserter
- Posts: 67
- Joined: Sun Nov 30, 2014 5:02 am
- Contact:
Re: Entity enable/disbale to generate lua event
Unfortunate, but I understand. Thanks Rseding91.
My Mods - Space Extension Mod (SpaceX)
- Train Supply Manager
Sandman2003 is forum name for LordKTor
SpaceX Extreme mode factory
Rocket Launch every second factory(ie 60rpm) - Bobs mod based
- Train Supply Manager
Sandman2003 is forum name for LordKTor
SpaceX Extreme mode factory
Rocket Launch every second factory(ie 60rpm) - Bobs mod based