# Double Tap! (Please read, my biggest achievement!)

#1

Ok, so I've discovered how to make Double Tap detectors!
Using this you can say, tap the potato to mash it, or double tap it to cut it! This code that I will show also detects taps, and it can tell the difference.

It's so simple, and I've never seen anyone do a double tap before!
Here is the code:

# These are the rules you put for the thing that get tapped/double tapped.

When Character is tapped
Increase Value (Tap) By 1

When Tap=1
Wait 250 Milleseconds
Check Once If (Tap)=1
Set Value (Tap2) To 1
Else
Set Value (Tap2) To 2
End
Set Value (Tap) to 0
Set Value (Tap2) To 0

# These Are The Rules For The Character That Reacts To The Tap/Double Tap

When (Tap2)=1
Do Whatever They Do At A Single Tap

When (Tap2)=2
Do Whatever They Do At A Single Tap

When ___ is double tapped
#2

This is awesome!

#3

good job! Thanks for sharing

#4

Great topic! I actually have seen someone on HS do that before (it wasn't me and I forgot who) and I've shared that trick before… but thanks for making this topic!

#5

One sec guys, there was other stuff on here that wasn't saved...

#6

That's amazing! Even though I already knew how to do this, I still love the sight of seeing others learn and share their achievements!

#7

Amazing! I'll try that out!

#8

That is surprisingly simple.

#9

Thanks guys! I had always wondered how to do double tap, and I did it!
You may see me using it in a few projects!

#10

Thank for sharing this! It will be very helpful to other coders!

#11

That's great coding you did.
This will help users allot when wanting to code for double tapping.

#12

Good code. Just a couple minor comments

When (Tap2)=2
Do Whatever They Do At A Single Tap

This should say …At A Double Tap

And switch these

Set Value (Tap) to 0
Set Value (Tap2) To 0

Tap2 should be set to 0 first or else if the double tap code is only 1 block it’ll execute twice.