04.06.2021, 12:49
(04.06.2021, 12:42)admin Wrote: For multiple objects you can use a tag. This way you can use a single script for all objects.
Using os.sleep in this case won't harm but it's possible to overload the system by having a lot of event script processes.
The more correct approach is to have an event script that sets/resets the last time that alarm was triggered (via storage) and a resident script which checks if the alarm has been set for a certain period then writes the alarm value to an object.
Could you give a pseudo example to set me off in the right direction?