Stormworks: Build and Rescue

Stormworks: Build and Rescue

評價次數不足
2Way Push Button
   
獎勵
加入最愛
已加入最愛
移除最愛
標籤: v1.8.2
檔案大小
發佈於
更新時間
83.169 KB
2023 年 6 月 28 日 下午 9:12
2023 年 6 月 29 日 上午 12:02
3 項更新註記 (檢視)

訂閱以下載
2Way Push Button

描述
【Translated from DeepL】
This is a sample of a push button that can be used 2-way.

A short press on the center push button turns the left light on and off.
Press and hold the push button for 1 second to turn the right light on and off.

Use one button for two-step operation, or use only the long push button to prevent malfunctions, etc.
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 the long press judgment time to about 2 seconds, use "pushtime = 120 --Long press judgment time(tick)".

If you require only the malfunction prevention button function, please refer to the following
https://steamcommunity.com/sharedfiles/filedetails/?id=2996158668