Discuss Scratch

firepaw_rusty
Scratcher
28 posts

[Wait until <Key space pressed>] Block?

Hi! So I'm currently making a video game for someone. I'm making it as a Birthday gift. Today is Wednesday, their birthday is on Wednesday next week, so although I have quite a bit of time to work on it, I still want a quick answer.

I'm creating a tutorial for the game, and I'm trying to use these blocks:
wait until <key [ space] pressed?>
broadcast [ Spacebar pressed]
And yes, the broadcast is connected to the block

Just to clear things up a bit, I'm going to name the sprite showing you what to do “TutorialSprite” and the player “Player”

Wanted to make it so that TutorialSprite will tell you to press spacebar to pick up something, and wait until the Player picks up the object before saying something else.
Since I have no idea what I'm doing about half the time, the script up there ^ doesn't work.

I'm also hoping that the character will be able to pick up other items throughout the game, so I don't want to use some sort of script that will trigger half of the tutorial during the gameplay.
cul8er
Scratcher
500+ posts

[Wait until <Key space pressed>] Block?

Try some sort of tutorial-unique message
broadcast [tutorial pick-up complete v]
Alternatively, you could make a variable:
(tutorial complete?)
Set to 0 if the tutorial is in progress, and 1 if it is complete.
I reckon this should probably be in the Help with Scripts forum. If you move it there you might get better results.

Last edited by cul8er (May 31, 2017 05:29:22)

footsocktoe
Scratcher
1000+ posts

[Wait until <Key space pressed>] Block?

firepaw_rusty wrote:

Hi! So I'm currently making a video game for someone. I'm making it as a Birthday gift. Today is Wednesday, their birthday is on Wednesday next week, so although I have quite a bit of time to work on it, I still want a quick answer.

I'm creating a tutorial for the game, and I'm trying to use these blocks:
wait until <key [ space] pressed?>
broadcast [ Spacebar pressed]
And yes, the broadcast is connected to the block

Just to clear things up a bit, I'm going to name the sprite showing you what to do “TutorialSprite” and the player “Player”

Wanted to make it so that TutorialSprite will tell you to press spacebar to pick up something, and wait until the Player picks up the object before saying something else.
Since I have no idea what I'm doing about half the time, the script up there ^ doesn't work.



I'm also hoping that the character will be able to pick up other items throughout the game, so I don't want to use some sort of script that will trigger half of the tutorial during the gameplay.

How does the player pick up the object? With the mouse? Is each object a sprite? Then you don't need the spacebar message. You can use this…
when this sprite clicked

Also, instead of
wait until <key [ space] pressed?>

you can use…
when [space v] key pressed
masterpoke435
Scratcher
9 posts

[Wait until <Key space pressed>] Block?

Footsocktoe i think that that is wrong. You want it to go through the instructions first then be able to do the tutorial

Last edited by masterpoke435 (March 3, 2021 01:15:02)

cat_tap
Scratcher
1000+ posts

[Wait until <Key space pressed>] Block?

masterpoke435 wrote:

Footsocktoe i think that that is wrong. You want it to go through the instructions first then be able to do the tutorial
To reply to things hit “quote” at the bottom.
I'll report this to be moved for you.

Powered by DjangoBB