I've been trying to make a button on scratch where if you press it once, it takes you to the help screen and if you press it again, it takes you back to the main menu. If anyone knows how to do this, please help! Thank you!
Asked
Active
Viewed 240 times
2 Answers
2
You could use two events. and you have everything on the help screen appear when one event happens, and hide when the other event occurs. Same with the main screen.
The code for the button would be something like this
when Green Flag clicked
go to front layer
forever
wait until mouse down and touching mouse-pointer
wait until not mouse down
broadcast msg1
wait until mouse down and touching mouse-pointer
wait until not mouse down
broadcast msg2
and for everything connected to the help screen,
when I receive msg1:
show
when I receive msg2:
hide
and for everything connected to the home screen,
when I receive msg2:
show
when I receive msg1:
hide

CoderTang
- 460
- 5
- 14
1

ianis2002
- 11
- 3