Key Toggle Box. Save as Phunlet. Set properties. Use.
RevA : Uses code from JakubKubo's
Key input detector.
Benefits:
1. The switch can display the name of the function of the switch (for example, like "roar" in wild bill's raptor scene).
2. The switch displays the key that is used to do the function.
3. The switch displays the state of the switch.
4. The switch separates the states from the control logic. You can put code in the states without regard or caring about the logic.
5. The switch initiates state1 once, preventing multiple restarts of state1 even when the key is held down.
6. The switch initiates state0 once, preventing multiple restarts of state0 even when the key is held down.