Profile image

Irreversible Boolean Activation System

67.1k SnoWFLakE0s  4.7 years ago

smooth(clamp01(boolX), clamp01(boolX)*(f/c))

f = activation frequency (Hz)
c = total activation count
boolX = some boolean data type (e.g. FireWeapons)

If the boolX is on, the target value is set to 1, the rate of change becomes f/c, thereby increasing by that amount every second.

You can have stuff activate every for > n/c, where n is the order number of the "activatee"
e.g. a series of 5 detachers would go 1/5, 2/5, 3/5.. etc.

This means weapons that are fired by FireWeapons, but w/o having to be an actual "weapon" and much more. The irreversible boolean can be used in other scenarios to define a soft cap for certain inputs. e.g. a usage limit for certain functions.

The test craft provided below shoots objects at a maximum rate of 1 shot / sec. Note that the input does not revert to its zero state.

Link to test craft.

  • Log in to leave a comment
  • Profile image

    I’m with you Snowflake!
    @SnoWFLakE0s

    4.7 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @SpiritusRaptor
    .
    Funky trees really expands your options, doesn't it... Lots more cool stuff will be coming from me as soon as the patch drops for everyone. Planning on my long lost SP dream a reality too.

    4.7 years ago
  • Profile image

    Ok, I will check it out... there are so many times when I wanted to operate gadgets in series! @SnoWFLakE0s

    4.7 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @SpiritusRaptor
    .
    Update, as in newer? This still works- it's a perfectly viable application still (as of 1.9.203).

    4.7 years ago
  • Profile image

    Brilliant work! do you have an update to this?

    4.7 years ago
  • Profile image

    You could use this to make a space shuttle that had the landing gears work correctly. @SnoWFLakE0s

    4.7 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @spefyjerbf
    .
    Sure!

    4.7 years ago
  • Profile image
    162k spefyjerbf

    Sounds about right. I would have done it myself, but I don’t have much time to play SP. Thanks!

    4.7 years ago
  • Profile image
    30.3k ChiChiWerx

    You could use this function to do a ripple release on a group of bombs, say for my F-105.

    4.7 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @CRJ900Pilot
    .
    Adds an extremely, extremely useful set of variables and functions.

    4.7 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @spefyjerbf
    .
    Very simple, simply start with smooth(clamp01(boolX), 1/d) = 1, where d is the delay in seconds. Will return true or false. Also note that behavior is delayed activation when boolean is true & immediate deactivation on boolean becoming false.

    +1 4.7 years ago
  • Profile image
    32.3k CRJ900Pilot

    I don’t get it, what do the new features do?

    4.7 years ago
  • Profile image
    162k spefyjerbf

    Very nice. I was actually thinking about trying to do something like this. Another possibility with the smooth function may be adding a delay to a Boolean input. Perhaps you could look into that for me?

    4.7 years ago