Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Threshold Number Gives Number
   
Award
Favorite
Favorited
Unfavorite
Microcontrollers: Calculation, Microcontroller
Tags: v1.5.1
File Size
Posted
Updated
22.523 KB
4 Jun, 2022 @ 10:28am
8 Jun, 2022 @ 3:33pm
2 Change Notes ( view )

Subscribe to download
Threshold Number Gives Number

In 1 collection by Brygun
BBW Microcontrollers
45 items
Description
The vanilla threshold outputs a boolean on-off while this outputs is a set number based on below, within or above threshold.

The output number is set by properties for below threshold, within threshold or above threshold.

Sample use is a clutch for connecting generators:
Build engine > clutch > generator
Set property thresholds as 0 to 0.99
Set property outputs as 1 if below, 1 if within range and 0 above range.
Connect output to clutch
Connect input to battery level (likely sum of all batteries)

Clutch will now engage if batteries at or below 99%

2 Comments
Brygun  [author] 8 Jun, 2022 @ 3:34pm 
Fixed. The adding function at the end was a+b+c when the variables are named x, y, z. Fixed as x+y+z.
Brygun  [author] 8 Jun, 2022 @ 3:01pm 
under review