How can I detect when a key has been released?
4 posts • Page 1 of 1
How can I detect when a key has been released?
I am currently working on a scene that requires the user to press and release keyboard keys. It's easy to activate a laser when a key gets pressed, for example, which sets a variable. But when the key is released, and the laser turns off, the variable in OnLaserHit or OnHitByLaser does not automatically get reset to zero. I figured out how to detect when a keypress is released using a motor-driven circle (arrrrgh!), but does anyone know a clever way to detect when a key is released without using mechanical devices such as motors turning, or boxes bumping into each other, etc? I want to do it with Thyme script alone, and of course with a laser that gets activated when a particular key is pressed.
Thanks!
Thanks!
-
Xray - Posts: 501
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: How can I detect when a key has been released?
I DID SOME MORE DIGGING THROUGH THE FORUMS AND I FOUND WHAT I WAS LOOKING FOR: http://www.algodoo.com/algobox/details.php?id=50835
-
Xray - Posts: 501
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: How can I detect when a key has been released?
good job 

Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: How can I detect when a key has been released?
Kilinich wrote:good job
Kilinich - It was YOUR clever scene that I used! Thanks very much for all the useful ideas that you come up with!


By the way, I am currently working on an Enigma cipher machine. It is very difficult and challenging, but I am making good progress. I will publish it some time this weekend.
-
Xray - Posts: 501
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
4 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests