Discuss Scratch

TacoMan7979
Scratcher
36 posts

Wait .03 secs. through wait .04 secs. have same delay time

I'm making an animation, and I put:

repeat until costume # = 34
next costume
wait .03 seconds

that was too fast, so I did this:

repeat until costume # = 34
next costume
wait .04 seconds

but that was too slow, so I tried everything in between .03-.04, and it was the same exact speed.
So basically .031 all the way through .04 have the same amount of delay. Does anyone know what is wrong or why this is happening?
Thingied
Scratcher
1000+ posts

Wait .03 secs. through wait .04 secs. have same delay time

Anything after 0.333… is going to be more than 3 frames on average. 0.3 = 2 frames, 0.4 = 3. Yeah it's kind of hard to do animations in scratch because it is capped at 30 FPS so just play around and see which looks best.
Oumuamua
Scratcher
1000+ posts

Wait .03 secs. through wait .04 secs. have same delay time

You try waiting 0.01
The_Imaginarium
Scratcher
1000+ posts

Wait .03 secs. through wait .04 secs. have same delay time

dayssince2000
Will fix all your problems because it can update faster than 30x per second.
TacoMan7979
Scratcher
36 posts

Wait .03 secs. through wait .04 secs. have same delay time

@Oumuamua I tried .01, but that's a little too fast, but thanks for the help

@The_Imaginarium How would I use the "days since 2000 block for animating?

@Thingied Yes, you are right! It is so annoying.
awesome-llama
Scratcher
1000+ posts

Wait .03 secs. through wait .04 secs. have same delay time

The_Imaginarium wrote:

dayssince2000
Will fix all your problems because it can update faster than 30x per second.

TacoMan7979 wrote:

How would I use the "days since 2000 block for animating?

While using “days since 2000” will overall keep the animation the right speed, it's not going to prevent frames of that animation from being skipped or paused as frame rate limits accuracy down to 1/30 sec. In this case, some animation frames will be displayed for 2 frames on screen. However, there isn't any other solution to this so that answer is what will have to be done.

Here's an example of animating in that way:

whenclickedsetstart timetodayssince2000setwait timeto0.035 put in your wait time hereforeverswitchcostumetodayssince2000-starttime*86400/waittime

Last edited by awesome-llama (July 3, 2021 12:53:18)

Awyzza
Scratcher
50 posts

Wait .03 secs. through wait .04 secs. have same delay time

Using waits on scales close to a single frame (0.033…s) is going to produce unintuitive results. You're better off working in frames rather than seconds which means using

wait0secs

as each of those will delay the script by exactly 1 frame.

Last edited by Awyzza (July 3, 2021 14:27:23)

reevo_56
Scratcher
17 posts

Wait .03 secs. through wait .04 secs. have same delay time

put it in a run without screen refresh block otherwise scratch will refresh every 0.3 seconds and so 0.1 won't do anything
awesome-llama
Scratcher
1000+ posts

Wait .03 secs. through wait .04 secs. have same delay time

reevo_56 wrote:

put it in a run without screen refresh block otherwise scratch will refresh every 0.3 seconds and so 0.1 won't do anything
Run without screen refresh doesn't make projects run faster than 30 FPS.
EpicGhoul993
Scratcher
1000+ posts

Wait .03 secs. through wait .04 secs. have same delay time

reevo_56 wrote:

put it in a run without screen refresh block otherwise scratch will refresh every 0.3 seconds and so 0.1 won't do anything
RWSR option doesn't affect the 30 frame limit. What you need to look for may be Turbo mode or 60/custom FPS mode in Turbowarp.

Powered by DjangoBB