Discuss Scratch

eaglgenes101
New to Scratch
100+ posts

How are sensors done?

I hope this isn't a noob question, but how are they done?
ProdigyZeta7
Scratcher
1000+ posts

How are sensors done?

Uhh… they report true or false, depending on if the condition is met.

<key space pressed?> -If the spacebar is held down, report true

<color ██ is touching ██?> -If the first color is in contact with the second, report true

<not <mouse down>> -If the mouse is not being held down, report true

<loud?> -If microphone volume is >30, report true (only in 1.4)

([variable1 v] of [Sprite2 v]) -report the value of the local variable of Sprite2

(current [second v]) -report the current second of your computer's clock

Learn more at Sensing Blocks.

Last edited by ProdigyZeta7 (Aug. 19, 2013 05:06:50)




eaglgenes101
New to Scratch
100+ posts

How are sensors done?

No, as in the “Underwater life” project.
drmcw
Scratcher
1000+ posts

How are sensors done?

Don't know what “Underwater life” project is but there's stuff about using sensors in the sticky topics.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
mitchboy
Scratcher
1000+ posts

How are sensors done?

Check out my project here. It has a slightly visible sensor when touching black. How it works is that each of the four lines on the sides of the marble are a slight tinge of a color (enough for a distinction between sides, but barely enough to be invisible), and each line detects when it touches black (the platform) it prevents the marble from going through the platform.

Hope this helps!

Capsicum annuum.

Powered by DjangoBB