Discuss Scratch

GameKnight053
New to Scratch
7 posts

Pause the game while a Shop is open

I have been trying to figure out how to pause the game (not completely stopping it) while the Shop is open, without having to do tons of lines of code in each sprite. Does anyone have any ideas?
asterlily
Scratcher
47 posts

Pause the game while a Shop is open

Okay, what shop and whats it do? Can you share the project?
CooIScratcher
Scratcher
22 posts

Pause the game while a Shop is open

Maybe you can control the game with a variable?
Like:
set [ v] to []

Put this in every script:


if <(name) = [1]> then

do this thing

else

don't do this thing

end

Last edited by CooIScratcher (May 24, 2019 01:00:58)

deck26
Scratcher
1000+ posts

Pause the game while a Shop is open

Assuming each object is running a main loop you can potentially just have a ‘pause’ variable and at the end of each loop add ‘wait until pause = 0’ so when pause is set to 1 the loop pauses.

Powered by DjangoBB