Discuss Scratch

Thepicausno
Scratcher
61 posts

Special Inputs?

I wanted to make a game where you can double tap left or right to run, as well as other “Special Inputs” How can I detect if a player “Double Taps” a button or inputs a quarter-circle?

TheArcadeGuy
Scratcher
100+ posts

Special Inputs?

If you're talking about double-clicking here is the solution.

when green flag clicked
if <mouse down?> then
reset timer
wait until <not <mouse down?>>
repeat until <(timer) > [1]>
if <mouse down?> then
broadcast [User has double clicked]
end


else

end

Last edited by TheArcadeGuy (Aug. 7, 2017 17:12:15)




footsocktoe
Scratcher
1000+ posts

Special Inputs?

Thepicausno wrote:

I wanted to make a game where you can double tap left or right to run, as well as other “Special Inputs” How can I detect if a player “Double Taps” a button or inputs a quarter-circle?

But don't double tap the mouse since Windows detects that. Although, I don't know if it still does when you are running Scratch.


SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!

TheArcadeGuy
Scratcher
100+ posts

Special Inputs?

footsocktoe wrote:

Thepicausno wrote:

I wanted to make a game where you can double tap left or right to run, as well as other “Special Inputs” How can I detect if a player “Double Taps” a button or inputs a quarter-circle?

But don't double tap the mouse since Windows detects that. Although, I don't know if it still does when you are running Scratch.

Not everybody uses windows, so it really depends on the user.

The only way to see what it will do is to test it.



Thepicausno
Scratcher
61 posts

Special Inputs?

TheArcadeGuy wrote:

If you're talking about double-clicking here is the solution.

when green flag clicked
if <mouse down?> then
reset timer
wait until <not <mouse down?>>
repeat until <(timer) > [1]>
if <mouse down?> then
broadcast [User has double clicked]
end


else

end

Awesome! This should work for keys too, right??

Last edited by Thepicausno (Aug. 8, 2017 17:27:42)


Powered by DjangoBB