Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need help...
- eevee02q6
-
4 posts
I need help...
Hello!
I am working on a game to where the player needs to press buttons in a specific order, and if they do that, the round will be complete. But if the player doesn't press the right buttons, or presses the right buttons but in a different order, the round will restart. They will be on the clock the entire time, so they can see how many rounds they've completed in that time. NOW, I need to figure out how to code the part where the player presses the buttons in the order, so the development can progress. I am stuck. I know how to code everything else, but that is where I need help. If anyone could help, that'd be great. Thanks!
I am working on a game to where the player needs to press buttons in a specific order, and if they do that, the round will be complete. But if the player doesn't press the right buttons, or presses the right buttons but in a different order, the round will restart. They will be on the clock the entire time, so they can see how many rounds they've completed in that time. NOW, I need to figure out how to code the part where the player presses the buttons in the order, so the development can progress. I am stuck. I know how to code everything else, but that is where I need help. If anyone could help, that'd be great. Thanks!
Last edited by eevee02q6 (Feb. 18, 2025 21:25:28)
- TheGamer7115
-
21 posts
I need help...
im sorry i cant help you when scratch is currently down with its sharing. 
-Leo

-Leo
- 102acrimea
-
60 posts
I need help...
Have a list containing the order which buttons need to be pressed and then use something like this script to detect.
Scratch blocks aren't my forte so it kind of melted but I hope you get the point
set [Itemno v] to [1]
forever
if <key (item (itemno v) of [buttonorder v] :: list) pressed?> then
wait until <not <key (item (itemno v) of [buttonorder v] :: list) pressed?>>
change [itemno v] by (1)
else
if <key [any v] pressed?> then
broadcast [lose v]
end
end
end
Scratch blocks aren't my forte so it kind of melted but I hope you get the point
Last edited by 102acrimea (Feb. 18, 2025 22:38:31)
- Discussion Forums
- » Help with Scripts
-
» I need help...