Stormworks: Build and Rescue

Stormworks: Build and Rescue

Không đủ lượt đánh giá
2Way Push Button
   
Giải thưởng
Yêu thích
Đã yêu thích
Bỏ thích
Nhãn: v1.8.2
Kích cỡ file
Đã đăng
Đã cập nhật
83.169 KB
28 Thg06, 2023 @ 9:12pm
29 Thg06, 2023 @ 12:02am
3 ghi chú thay đổi ( xem )

Đăng ký để tải xuống
2Way Push Button

Mô tả
【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