Discuss Scratch

Kami-ko
Scratcher
100+ posts

PAUSE scripts

rj8wjeiw wrote:

A well designed premium Scratch game would have a loop that looks like this:

forever
frame ::custom
wait ((1)/(30)) secs
end

And, of course, it becomes a matter of recognizing the pause button input each frame. The in-game frame time also pauses. No problem with that. The problem is what happens to the music.

Can you explain this in further detail?
Kami-ko
Scratcher
100+ posts

PAUSE scripts

I'm sorry, I don't why it posted 3 times :?
RacecarFox16
Scratcher
5 posts

PAUSE scripts

I made a pausing & animating script you can use easily :

NOTE: Frame# = the last frame + Animate until Frame# (last number of frames)

define Animate until frame (Frame#) (FPS)
repeat until <((Frame#) - (costume [number v])) = (0)>
wait until <(Paused?) = (0)>
next costume
wait (FPS) secs

Last edited by RacecarFox16 (June 7, 2025 21:35:38)

Powered by DjangoBB