Discuss Scratch

kirbymetoo
Scratcher
9 posts

Needs New Feature!! If Then Block Problem!!!

So when I was new to scratch, I made a game that included If then blocks as sensors. But there was only one problem. The block ran a when I receive block and when it was supposed to work, it only functioned for a single second!!! This is a big problem I thought. If only there was a timer feature for the if then block!!!

if <> then
say [*If ___ for ___ seconds then*]
end

This is what it would be nice to have! (The say block inside is supposed to represent the top)
ametrine_
Scratcher
1000+ posts

Needs New Feature!! If Then Block Problem!!!

if you want to suggest a new feature, please make a topic in the Suggestions forum instead of Developing Scratch Extensions.
anyway, you can already do this with this code (using 3 seconds as an example):

repeat (90) // 1 frame takes 1/30 of a second, so this runs the if block every frame for 3 seconds
if <> then
...
end
end
or alternatively:

reset timer
repeat until <(timer) > [3]>
if <> then
...
end
end
secretuch
Scratcher
100+ posts

Needs New Feature!! If Then Block Problem!!!

This should be moved to help with scripts
secretuch
Scratcher
100+ posts

Needs New Feature!! If Then Block Problem!!!

ametrine_ wrote:

if you want to suggest a new feature, please make a topic in the Suggestions forum instead of Developing Scratch Extensions.
anyway, you can already do this with this code (using 3 seconds as an example):
-snip-



It’s not an suggestion it’s an help with scripts
ametrine_
Scratcher
1000+ posts

Needs New Feature!! If Then Block Problem!!!

secretuch wrote:

It’s not an suggestion it’s an help with scripts
this is a suggestion, look at the topic's title
kirbymetoo
Scratcher
9 posts

Needs New Feature!! If Then Block Problem!!!

Ok thanks

Powered by DjangoBB