ScratchData LogoScratchData
Back to drjay's profile

Simultaneous Keys Demo

DRdrjay•Created April 19, 2015
Simultaneous Keys Demo
0
0
33 views
View on Scratch

Instructions

This program demonstrates a technique for detecting when two keys are pressed "simultaneously." Of course the detection is not perfect, but it's a reasonable approach for many Scratch projects. The idea is to set flags when keys are pressed (set their values to 1) and remove those flags (set their values back to 0) after 0.1 seconds. The key presses themselves trigger a "wait for" block that controls a stack of actions. The "wait for" condition is that both flags are set to 1. If this is true, the blocks in the stack are executed and then the flags are reset to 0. This approach could be extended to any number of keys and actions.

Description

Jesse Heines, UMass Lowell Performamatics Project, Sound Thinking Course April 19, 2015

Project Details

Project ID57809932
CreatedApril 19, 2015
Last ModifiedApril 21, 2015
SharedApril 19, 2015
Visibilityvisible
CommentsAllowed