Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Malfunction prevention button
   
Award
Favorite
Favorited
Unfavorite
Tags: v1.8.2
File Size
Posted
54.104 KB
Jun 28, 2023 @ 11:31pm
1 Change Note ( view )

Subscribe to download
Malfunction prevention button

Description
【Translated from DeepL】
This is a "Malfunction Prevention Button" from which a part of 2Way Push Button is extracted.

For more information about 2Way Push Button, please refer to here.
https://steamcommunity.com/sharedfiles/filedetails/?id=2996129128

This is a sample microcontroller with a push button malfunction prevention function.
By default, the lamp turns on and off when the push button is pressed and held for about 1 second.
If you want to change the time for the long press judgment, change the time at the top of the Lua code.

Default: "pushtime = 60 --Long press judgment time(tick)".

The default "60" is the tick value.
On average, 1 tick is 1/60th of a second, so 60 ticks is about 1 second.
For example, if you want to set a long press judgment time of about 2 seconds, use "pushtime = 120 --Long press judgment time(tick)".
Since the tick time varies depending on the PC environment used, please adjust the tick time according to your preference.