Browse Search Popular Register Upload Rules User list Login:
Search:
Keyed Toggle Switch

Image:
screenshot of the scene

Author: s_noonan

Group: Technical

Filesize: 31.86 kB

Date added: 2018-01-08

Rating: 5.6

Downloads: 264

Views: 242

Comments: 4

Ratings: 2

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

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.
Last edited at 2018/01/11 10:21:51 by s_noonan
Please log in to rate this scene
edit
Similar scenes
Title: Dr. Nim
Rating: 5
Filesize: 52.52 kB
Downloads: 94
Comments: 0
Ratings: 1
Date added: 2019/04/07 01:57:32
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Phun Blocks v 2.0
Rating: 7.0833
Filesize: 186.12 kB
Downloads: 113
Comments: 3
Ratings: 12
Date added: 2009/02/01 17:48:33
Made with: Phun
no image found for this scene
Rating: rated 7.1
download
Title: 3 gears car
Rating: 5
Filesize: 265.55 kB
Downloads: 295
Comments: 0
Ratings: 1
Date added: 2009/06/07 03:06:02
Made with: Phun
Rating: rated 5
download
Title: New Mechanical Toggle Switch
Rating: 7.6667
Filesize: 18.79 kB
Downloads: 191
Comments: 8
Ratings: 3
Date added: 2009/02/18 18:50:55
Made with: Phun
Rating: rated 7.7
download
Title: Dwarf Cannon
Rating: 6.8667
Filesize: 28.81 kB
Downloads: 928
Comments: 16
Ratings: 9
Date added: 2011/01/08 02:38:46
Made with: Algodoo before v1.8.5
Rating: rated 6.9
download
Title: Switches !
Rating: 5
Filesize: 66.18 kB
Downloads: 613
Comments: 1
Ratings: 1
Date added: 2020/10/25 19:08:52
Made with: Algodoo before v1.8.5
Rating: rated 5
download
Works same as mine key input detector, but this one is beatifuly colorfull:D
Actually, yours works better. Your Key input detector has more functionality with less code. I made multiple copies of the Key input detector and assigned different keys. They all worked independently. I tried a counter test to make sure the _up and _down only fire once per key press and I couldn't get it to screw up. Nice work.:tup:

P.S. I liked your code so much, I revised my scene using your code.
Last edited at 2018/01/11 10:26:27 by s_noonan
Will it be on YT?
No.