Profile image

Powerup Button in 9 setters (2210201055)

110k hpgbproductions  2.1 years ago
7 downloads
Unlisted No Tags
Auto Credit Based on hpgbproductions's Powerup Button in 9 setters (old)

Note:

  • All setters at priority 0. Other priority values untested.
  • Button has interactionType=Toggle and input is MyButton
  • You can add your own graphics (timer on the button and label that shows ¤ when ready are provided as examples)
  • Works but may be unoptimized

Note 24.03.31 > At the cost of readability, the MyPowerupActive and MyButton setters can be combined to reduce the count to 7 setters.

POWERUP_DURATION = 3
[Constant] Set the length of time which the power is available for.

CHARGE_DURATION = 5
[Constant] Set the length of time which is needed for cooldown.

MyPowerupActiveTimer = smooth(MyPowerupActive=1 ? 999999 : 0, MyPowerupActive=1 ? 1 : 999999)
Time that the power is active. Resets to 0 once the power deactivates.

MyPowerupChargeTimer = smooth(MyPowerupActive=0&Time>0.1 ? 999999 : 0, MyPowerupActive=0&Time>0.1 ? 1 : 999999)
Time since the power last deactivated. Resets to 0 once the power activates again.

MyPowerupReady = MyPowerupChargeTimer>CHARGE_DURATION
Use the charge timer to determine when the power is ready for next activation.

MyPowerupActive = 1
WHEN MyButton=1 & MyPowerupReady
Sets the active flag to 1 when the button is pressed and the power is ready.

MyPowerupActive = 0
WHEN MyPowerupActiveTimer>POWERUP_DURATION
Sets the active flag to 0 when the power time is up.

MyButton = 1
WHEN MyPowerupActive=1
Enforces the button pressed condition when the power is active, i.e., the button cannot be released when the power is active.

MyButton = 0
WHEN MyPowerupActive=0&MyPowerupChargeTimer<CHARGE_DURATION
Enforces the button released condition during cooldown, i.e., the button is automatically released when the power expires and cannot be pressed during cooldown.

General Characteristics

  • Predecessor Powerup Button in 9 setters (old)
  • Created On Android
  • Wingspan 3.3ft (1.0m)
  • Length 9.3ft (2.8m)
  • Height 10.0ft (3.1m)
  • Empty Weight 660lbs (299kg)
  • Loaded Weight 660lbs (299kg)

Performance

  • Wing Loading N/A
  • Wing Area 0.0ft2 (0.0m2)
  • Drag Points 881

Parts

  • Number of Parts 10
  • Control Surfaces 0
  • Performance Cost 78
  • Log in to leave a comment
  • Profile image
    59.3k TheMouse

    @DatTrainAndCarGuy19
    I am omnipresent. The real question is why I did not find this until now.

    +1 7 months ago
  • Profile image
    28.1k YarisSedan

    @Mousewithamachinegun122 how the heck did you find this lmao

    +1 7 months ago
  • Profile image
    59.3k TheMouse

    @DatTrainAndCarGuy19
    Fancy seeing you here!

    +1 7 months ago
  • Profile image
    28.1k YarisSedan

    Complex Ahh Funky-Tress
    also leaving my mark here

    +1 8 months ago

This post is unlisted and upvoting is disabled.