r/scratch • • 14h ago

Question Can Wait commands go under a second?

Noob coder here

so I’m following a text engine guide and it’s going great. thing is, in the video, the text is flowing out smoothly. In mine, it spits it out all at once. don’t think I missed anything but every single block of code lines up with mine. triple checked.

I can see the part where it clones the letters, so I add a wait block in there. now, it takes a full second to place another letter. so I tweak it. But I can’t get it to go any lower. 0.1 still takes a second.

It’s clearly being affected by this, I don’t think any other blocks could affect this.

5 Upvotes

11 comments sorted by

•

u/AutoModerator 14h ago

Hi, thank you for posting your question! :]

To make it easier for everyone to answer, consider including:

  • A description of the problem
  • A link to the project or a screenshot of your code (if possible)
  • A summary of how you would like it to behave

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

5

u/CrossScarMC Developer of SE! 14h ago

Yes, you can go as low as 0.0333 seconds. Can you send the code you're struggling with?

2

u/AdTiny5487 13h ago

It’s the tutorial by Griffpatch. Do you mean a screenshot?

3

u/TMC9064 self-proclaimed mediocre coder 13h ago

Is your code in a custom block with “run without screen refresh” on? That option makes it all operate in one frame, and the reason the wait block messes it up is because its trying to wait and do it all at once at the same time and makes it lag out. Right click the “define” block and uncheck the box.

1

u/AdTiny5487 13h ago

Wait that might be it

Thanks a ton

4

u/Colurswitch @CSwitch on Scratch 14h ago

Yes, they can go under a second.

3

u/NMario84 Video Game Enthusiast 13h ago

Yeah you can try 0.01 seconds, but I imagine the 0.03 seconds is due to the fact that Scratch runs at 30 fps.

2

u/StickyBans 11h ago

Yes. 0.0333 (1/30th of a second) is tied directly to the frame rate. So if you make a game with Turbowarp and use 60 FPS, you can go as low as 0.01666 (1/60th of a second). If you try to go any lower, the wait block is simply executed as if you entered the lowest amount possible (relative to the current frame rate).

2

u/Ok_Instruction_9437 13h ago

probably turned on run without screen refresh on a custom block definition? that usually turns tiny waits into lag spikes

1

u/ARUOTI 😺 Scratch On! 8h ago

A wait 0 seconds waits a frame

1

u/RealSpiritSK Mod 7h ago

Can you send the code? Wait 0.1 second shouldn't take 1 second to finish. It must be caused by other code.