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: 130

Views: 86

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: Keyed Momentary On Switch
Rating: 5.625
Filesize: 31.72 kB
Downloads: 182
Comments: 8
Ratings: 2
Date added: 2018/01/08 23:42:10
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
Title: 3 gears car
Rating: 5
Filesize: 265.55 kB
Downloads: 195
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: 166
Comments: 8
Ratings: 3
Date added: 2009/02/18 18:50:55
Made with: Phun
Rating: rated 7.7
download
Title: Jeep Grand Cherokee (WK2) 3.0L V6
Rating: 7.5
Filesize: 2.37 MB
Downloads: 4764
Comments: 14
Ratings: 8
Date added: 2015/10/31 19:59:08
Made with: Algodoo v2.1.0
Rating: rated 7.5
download
Title: ground flyer
Rating: 5.625
Filesize: 12.4 kB
Downloads: 279
Comments: 1
Ratings: 2
Date added: 2009/12/28 14:33:14
Made with: Algodoo before v1.8.5
Rating: rated 5.6
download
Title: Nintendo Switch
Rating: 5
Filesize: 77.59 kB
Downloads: 80
Comments: 0
Ratings: 1
Date added: 2018/04/05 02:40:33
Made with: Algodoo v2.1.0
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.