Discuss Scratch

ssw1983
New Scratcher
5 posts

Help! Scratch stops running when backdrop changes/space key pressed.

Hi,

I'm a complete beginner, and trying to create a little maze game. I've done a front page with a couple of scripts, and then added a press space key to change backdrops and move to the main maze page. I'm trying to get two ‘helmet’ sprites to move back and forth across the screen. However, when I press the space key to change backdrops, the whole thing stops, and the helmets don't move.
Here's the project.

Please can someone help?
robotfan218-testing
Scratcher
12 posts

Help! Scratch stops running when backdrop changes/space key pressed.

okay so i think… if you make it when flag clicked for the helmets (same with the player)
and put the thumbnail thing as its OWN sprite
using this code you can make it hide when pressing space
when [space] key pressed
set [ghost] effect to (100)
and also for the thumbnail
when green flag clicked
go to front

Last edited by robotfan218-testing (Aug. 23, 2023 13:52:38)

robotfan218-testing
Scratcher
12 posts

Help! Scratch stops running when backdrop changes/space key pressed.

oh and also if you replace the movement code with the code in the image

the movement will feel MUCH better, also fixes being able to phase through the walls
this isnt related to the post needing help, its just QOL (in my opinion)
deck26
Scratcher
1000+ posts

Help! Scratch stops running when backdrop changes/space key pressed.

Why does lighning2 stop all when the backdrop switches? That's what's stopping the project.
ssw1983
New Scratcher
5 posts

Help! Scratch stops running when backdrop changes/space key pressed.

Omg, thank you so much guys. Total beginner fail on the stop all thing, thanks deck26.
And thanks for the other coding suggestions, robotfan, super-useful!

Cheers to you both
ForeverDebugging
Scratcher
16 posts

Help! Scratch stops running when backdrop changes/space key pressed.

Aw man, I put the fix in a remix and didn't get noticed lol!

Powered by DjangoBB