04.06.2021, 12:42
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.
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.