Discuss Scratch
- Discussion Forums
- » Suggestions
- » More keyboard blocks
- Cubey_Dudey
-
Scratcher
100+ posts
More keyboard blocks
In a game I'm making I wanted to add a feature where you can change the controls and I would find it alot easier with these 2 blocks.
First up a “when key (any) is pressed” would be useful so I know if they pressed anything. I could make the code to wait for any key to be pressed before changing the key.
A simplified version of the code I would use it in would look like this:
First up a “when key (any) is pressed” would be useful so I know if they pressed anything. I could make the code to wait for any key to be pressed before changing the key.
<key [any v] pressed?>Also a “last key press” could be useful with the same script, I would say wait until any key is pressed and set the control to that key.
(last key press)
A simplified version of the code I would use it in would look like this:
when I receive [change control v]
wait until <key [any v] pressed?>
set [control v] to (last key press)
Last edited by Cubey_Dudey (April 20, 2023 06:00:19)
- -RabbitWorld-
-
Scratcher
1000+ posts
More keyboard blocks
These blocks you've suggested could be very useful in a bunch of different types of projects. Support!
- kkidslogin
-
Scratcher
1000+ posts
More keyboard blocks
key ,any> presssed
already exists.
Last key pressed can be worked around (Albeit it is clunky), and there is a turbowarp block for that, but I would like to see something like this.
already exists.
Last key pressed can be worked around (Albeit it is clunky), and there is a turbowarp block for that, but I would like to see something like this.
- Knightbot63
-
Scratcher
1000+ posts
More keyboard blocks
key any press already exists.
And last key pressed may be a duplicate but I tried searching but ocular's down.
And last key pressed may be a duplicate but I tried searching but ocular's down.
- medians
-
Scratcher
1000+ posts
More keyboard blocks
key any press already exists.I found this:
And last key pressed may be a duplicate but I tried searching but ocular's down.
https://scratch.mit.edu/discuss/topic/151492/
- GIitchInTheMatrix
-
Scratcher
1000+ posts
More keyboard blocks
key any press already exists.back in the ye old days, when we used google, such peasantry to which we had done
And last key pressed may be a duplicate but I tried searching but ocular's down.
- Knightbot63
-
Scratcher
1000+ posts
More keyboard blocks
(#6)Then that's the duplicate I assume.
I found this:
https://scratch.mit.edu/discuss/topic/151492/
- Discussion Forums
- » Suggestions
-
» More keyboard blocks
