Discuss Scratch

WindOctahedron
Scratcher
1000+ posts

Workarounds to frequently suggested blocks

Computer_Fizz wrote:

mica43683 wrote:

when <> is true :: hat events
can, more easily, be recreated with
forever
if <...> then
...
wait until <not <...>>
end
end
no, because your version requires the green flag to be clicked. it could be said that not requiring the flag is the entire point of the block.
Why would not requiring to click the flag be an advantage? I can't think of anthing, except for sprite stopping and still being able to run something after that (including the “when” workaround), which is simple to workaround:
when green flag clicked
broadcast [start v]
when I receive [start v] // use this instead of the "green flag" block for every other script

stop other scripts in sprite :: custom // use this instead of just "stop other scripts in sprite"
define stop other scripts in sprite
stop [other scripts in sprite v]
broadcast [start v]

This post is brought to you by WindOctahedron's brain
Look Listen, it even made some music.
Be moist so you can feel cool when my wind blows.
Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

mica43683 wrote:

Computer_Fizz wrote:

kittiesrule247 wrote:

No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.
regardless, my version actually creates the block better, which is first priority.
Actually, if you want it to work in seperate sprites, you need to use my idea. The broadcast would get carried out to other sprites as well, and trigger the script in them.
Not if you use a different system broadcast for each, but still, I think this is the best way to do it.

when green flag clicked                             
broadcast [whenistrue v]
broadcast [stopdetector v]



when I receive [stopdetector v]
forever
reset timer
end

when I receive [whenistrue v]
forever
if <...> then
...
wait until <not <...>>
end
end

when [timer v] > (0.1)
broadcast [whenistrue v]
broadcast [stopdetector v]

Last edited by Beamy68 (Oct. 26, 2019 10:48:51)


when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

mica43683
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Beamy68 wrote:

mica43683 wrote:

Computer_Fizz wrote:

kittiesrule247 wrote:

No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.
regardless, my version actually creates the block better, which is first priority.
Actually, if you want it to work in seperate sprites, you need to use my idea. The broadcast would get carried out to other sprites as well, and trigger the script in them.
Not if you use a different broadcast for each.
That would clutter the broadcast list.

What's the point of this signature? Is it just here because if it wasn't here, it wouldn't be here? And, what if it wasn't here? It would just be doomed to the fate of not being here. Isn't life like that? If you're never born, you never die, but you can only never die if you're never born. But, if you're never born, you're not alive. If you're not alive, doesn't that mean you're dead? But, if you're dead before you're born, that must mean that you start dead, and end dead. But, that can't make sense, because humans say that you die when your life ends. And, speaking of humans, why are they on this planet? Slowly ruling it a little bit more. It doesn't make any sense. To think that once, humans would live in caves, killing rabbits with their bare hands. Now, they have wireless PS4 controllers. As humans progress with technology, us signatures will be enslaved to advertise businesses on EMails. Remember those good old days, when signatures were just little pieces of text with your name on them that you'd put on all your mail? That was fun. Now, we have no use, other than to show existential crises to people who couldn't care less about the uses of signatures.
Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Computer_Fizz wrote:

your multiple timers thing while cool as a concept 1) count too fast 2) isn't really a workaround (this is mostly intended for blocks). i may consider adding a link to a working version though.

i already have a previous costume workaround, so what's yours besides requiring a variable?

however, i will add the key enter pressed thing from your tests project

Well actually in my tests project there is previous costume that isn't hacked and is easy to add to any project.

You name a costume previous costume, set the set costume block to that, drag the costume block to your backpack and delete or rename the “previous costume” costume.

EDIT: It shows up as
switch costume to [previous costume v]

Last edited by Beamy68 (Oct. 26, 2019 10:56:10)


when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

mica43683 wrote:

Beamy68 wrote:

mica43683 wrote:

Computer_Fizz wrote:

kittiesrule247 wrote:

No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.
regardless, my version actually creates the block better, which is first priority.
Actually, if you want it to work in seperate sprites, you need to use my idea. The broadcast would get carried out to other sprites as well, and trigger the script in them.
Not if you use a different broadcast for each.
That would clutter the broadcast list.
True…
still, this is the best way to do it.

when green flag clicked                             
broadcast [whenistrue v]
broadcast [stopdetector v]



when I receive [stopdetector v]
forever
reset timer
end

when I receive [whenistrue v]
forever
if <...> then
...
wait until <not <...>>
end
end

when [timer v] > (0.1)
broadcast [whenistrue v]
broadcast [stopdetector v]

Last edited by Beamy68 (Oct. 26, 2019 11:00:02)


when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

WindOctahedron
Scratcher
1000+ posts

Workarounds to frequently suggested blocks

Improved workaround of Beamy68, because here, the timer can be used for other purposes:
when green flag clicked
broadcast [whenistrue v]
broadcast [stopdetector v]



when I receive [stopdetector v]
forever
set [timer v] to ((timer)+(0.1))
end

when I receive [whenistrue v]
forever
if <...> then
...
wait until <not <...>>
end
end

when [timer v] > (timer :: variables)
broadcast [whenistrue v]
broadcast [stopdetector v]

This post is brought to you by WindOctahedron's brain
Look Listen, it even made some music.
Be moist so you can feel cool when my wind blows.
mica43683
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Beamy68 wrote:

I think this is the best way to do it.

when green flag clicked                             
broadcast [whenistrue v]
broadcast [stopdetector v]



when I receive [stopdetector v]
forever
reset timer
end

when I receive [whenistrue v]
forever
if <...> then
...
wait until <not <...>>
end
end

when [timer v] > (0.1)
broadcast [whenistrue v]
broadcast [stopdetector v]
That clutters the broadcast list, the variable list, and the editor. And, as I said:

mica43683 wrote:

If you really insist on not using the green flag, just use this:
when green flag clicked
forever
reset timer
end
when [timer v] > (0.1)
forever
if <...> then
...
wait until <not <...>>
end
end

What's the point of this signature? Is it just here because if it wasn't here, it wouldn't be here? And, what if it wasn't here? It would just be doomed to the fate of not being here. Isn't life like that? If you're never born, you never die, but you can only never die if you're never born. But, if you're never born, you're not alive. If you're not alive, doesn't that mean you're dead? But, if you're dead before you're born, that must mean that you start dead, and end dead. But, that can't make sense, because humans say that you die when your life ends. And, speaking of humans, why are they on this planet? Slowly ruling it a little bit more. It doesn't make any sense. To think that once, humans would live in caves, killing rabbits with their bare hands. Now, they have wireless PS4 controllers. As humans progress with technology, us signatures will be enslaved to advertise businesses on EMails. Remember those good old days, when signatures were just little pieces of text with your name on them that you'd put on all your mail? That was fun. Now, we have no use, other than to show existential crises to people who couldn't care less about the uses of signatures.
kittiesrule247
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Just add Mica's way as another way. I don't care if Computer_Fizz's works better, Mica's way is better for inexperienced programmers who are looking for something simple.

LGBTQIAPNDO+ PRIDE
mica43683
Scratcher
100+ posts

Workarounds to frequently suggested blocks

kittiesrule247 wrote:

Mica's way is better for inexperienced programmers who are looking for something simple.
Mine is also better because it uses less code. Only 1 or 2 scripts.

What's the point of this signature? Is it just here because if it wasn't here, it wouldn't be here? And, what if it wasn't here? It would just be doomed to the fate of not being here. Isn't life like that? If you're never born, you never die, but you can only never die if you're never born. But, if you're never born, you're not alive. If you're not alive, doesn't that mean you're dead? But, if you're dead before you're born, that must mean that you start dead, and end dead. But, that can't make sense, because humans say that you die when your life ends. And, speaking of humans, why are they on this planet? Slowly ruling it a little bit more. It doesn't make any sense. To think that once, humans would live in caves, killing rabbits with their bare hands. Now, they have wireless PS4 controllers. As humans progress with technology, us signatures will be enslaved to advertise businesses on EMails. Remember those good old days, when signatures were just little pieces of text with your name on them that you'd put on all your mail? That was fun. Now, we have no use, other than to show existential crises to people who couldn't care less about the uses of signatures.
mica43683
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Also, the
move up (number) steps :: motion
block can be more easily recreated with
change y by (number)
Well, it can in the way you're suggesting it. The way steps work is moving () pixels in the direction it's pointing. So, if the block was to actually be added, it would move () pixels toward the top of the sprite, rather than the top of the screen. Here's the proper workaround:
turn ccw (90) degrees
move (number) steps
turn cw (90) degrees

Last edited by mica43683 (Oct. 27, 2019 12:29:41)


What's the point of this signature? Is it just here because if it wasn't here, it wouldn't be here? And, what if it wasn't here? It would just be doomed to the fate of not being here. Isn't life like that? If you're never born, you never die, but you can only never die if you're never born. But, if you're never born, you're not alive. If you're not alive, doesn't that mean you're dead? But, if you're dead before you're born, that must mean that you start dead, and end dead. But, that can't make sense, because humans say that you die when your life ends. And, speaking of humans, why are they on this planet? Slowly ruling it a little bit more. It doesn't make any sense. To think that once, humans would live in caves, killing rabbits with their bare hands. Now, they have wireless PS4 controllers. As humans progress with technology, us signatures will be enslaved to advertise businesses on EMails. Remember those good old days, when signatures were just little pieces of text with your name on them that you'd put on all your mail? That was fun. Now, we have no use, other than to show existential crises to people who couldn't care less about the uses of signatures.
Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

mica43683 wrote:

Beamy68 wrote:

I think this is the best way to do it.

when green flag clicked                             
broadcast [whenistrue v]
broadcast [stopdetector v]



when I receive [stopdetector v]
forever
reset timer
end

when I receive [whenistrue v]
forever
if <...> then
...
wait until <not <...>>
end
end

when [timer v] > (0.1)
broadcast [whenistrue v]
broadcast [stopdetector v]
That clutters the broadcast list, the variable list, and the editor. And, as I said:

mica43683 wrote:

If you really insist on not using the green flag, just use this:
when green flag clicked
forever
reset timer
end
when [timer v] > (0.1)
forever
if <...> then
...
wait until <not <...>>
end
end


Yes TWO broadcasts what a clutter!

when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

mica43683
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Beamy68 wrote:

mica43683 wrote:

Beamy68 wrote:

I think this is the best way to do it.

when green flag clicked                             
broadcast [whenistrue v]
broadcast [stopdetector v]



when I receive [stopdetector v]
forever
reset timer
end

when I receive [whenistrue v]
forever
if <...> then
...
wait until <not <...>>
end
end

when [timer v] > (0.1)
broadcast [whenistrue v]
broadcast [stopdetector v]
That clutters the broadcast list, the variable list, and the editor. And, as I said:

mica43683 wrote:

If you really insist on not using the green flag, just use this:
when green flag clicked
forever
reset timer
end
when [timer v] > (0.1)
forever
if <...> then
...
wait until <not <...>>
end
end


Yes TWO broadcasts what a clutter!
Y'know, there's no need to be rude. My way works the same way, if not faster. It works without having to take up space on the project editor.

Last edited by mica43683 (Oct. 27, 2019 14:14:17)


What's the point of this signature? Is it just here because if it wasn't here, it wouldn't be here? And, what if it wasn't here? It would just be doomed to the fate of not being here. Isn't life like that? If you're never born, you never die, but you can only never die if you're never born. But, if you're never born, you're not alive. If you're not alive, doesn't that mean you're dead? But, if you're dead before you're born, that must mean that you start dead, and end dead. But, that can't make sense, because humans say that you die when your life ends. And, speaking of humans, why are they on this planet? Slowly ruling it a little bit more. It doesn't make any sense. To think that once, humans would live in caves, killing rabbits with their bare hands. Now, they have wireless PS4 controllers. As humans progress with technology, us signatures will be enslaved to advertise businesses on EMails. Remember those good old days, when signatures were just little pieces of text with your name on them that you'd put on all your mail? That was fun. Now, we have no use, other than to show existential crises to people who couldn't care less about the uses of signatures.
Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

mica43683 wrote:

Beamy68 wrote:

mica43683 wrote:

Beamy68 wrote:

I think this is the best way to do it.

when green flag clicked                             
broadcast [whenistrue v]
broadcast [stopdetector v]



when I receive [stopdetector v]
forever
reset timer
end

when I receive [whenistrue v]
forever
if <...> then
...
wait until <not <...>>
end
end

when [timer v] > (0.1)
broadcast [whenistrue v]
broadcast [stopdetector v]
That clutters the broadcast list, the variable list, and the editor. And, as I said:

mica43683 wrote:

If you really insist on not using the green flag, just use this:
when green flag clicked
forever
reset timer
end
when [timer v] > (0.1)
forever
if <...> then
...
wait until <not <...>>
end
end


Yes TWO broadcasts what a clutter!
Y'know, there's no need to be rude. My way works the same way, if not faster. It works without having to take up space on the project editor.
Sorry, wasn't trying to be rude, I was saying it sarcastically

when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

mica43683 wrote:

If you really insist on not using the green flag, just use this:
when green flag clicked
forever
reset timer
end
when [timer v] > (1)
forever
if <...> then
...
wait until <not <...>>
end
end

That doesn't work, you would have to press the stop flag first and it wouldn't run when the green flag is clicked, it's supposed to run all the time, not just when the project isn't running

when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

WindOctahedron
Scratcher
1000+ posts

Workarounds to frequently suggested blocks

Beamy68 wrote:

mica43683 wrote:

If you really insist on not using the green flag, just use this:
when green flag clicked
forever
reset timer
end
when [timer v] > (1)
forever
if <...> then
...
wait until <not <...>>
end
end

That doesn't work, you would have to press the stop flag first and it wouldn't run when the green flag is clicked, it's supposed to run all the time, not just when the project isn't running
Have you read this?

This post is brought to you by WindOctahedron's brain
Look Listen, it even made some music.
Be moist so you can feel cool when my wind blows.
Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

WindOctahedron wrote:

Beamy68 wrote:

mica43683 wrote:

If you really insist on not using the green flag, just use this:
when green flag clicked
forever
reset timer
end
when [timer v] > (1)
forever
if <...> then
...
wait until <not <...>>
end
end

That doesn't work, you would have to press the stop flag first and it wouldn't run when the green flag is clicked, it's supposed to run all the time, not just when the project isn't running
Have you read this?
Yup.

when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

Computer_Fizz
Scratcher
100+ posts

Workarounds to frequently suggested blocks

mica43683 wrote:

Also, the
move up (number) steps :: motion
block can be more easily recreated with
change y by (number)
Well, it can in the way you're suggesting it. The way steps work is moving () pixels in the direction it's pointing. So, if the block was to actually be added, it would move () pixels toward the top of the sprite, rather than the top of the screen. Here's the proper workaround:
turn ccw (90) degrees
move (number) steps
turn cw (90) degrees
yeah, i see that block suggested a lot but the problem is i'm not entirely sure what it's supposed to do. i think people don't understand that the move steps block moves in the direction you're pointing, which would “up” be perpendicular, but that's not up. yet the change y seems like too simple a workaround that that can't possibly be what they mean.
mica43683
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Beamy68 wrote:

mica43683 wrote:

If you really insist on not using the green flag, just use this:
when green flag clicked
forever
reset timer
end
when [timer v] > (1)
forever
if <...> then
...
wait until <not <...>>
end
end

That doesn't work, you would have to press the stop flag first and it wouldn't run when the green flag is clicked, it's supposed to run all the time, not just when the project isn't running
I meant that you'd do that seperately to your original script.

What's the point of this signature? Is it just here because if it wasn't here, it wouldn't be here? And, what if it wasn't here? It would just be doomed to the fate of not being here. Isn't life like that? If you're never born, you never die, but you can only never die if you're never born. But, if you're never born, you're not alive. If you're not alive, doesn't that mean you're dead? But, if you're dead before you're born, that must mean that you start dead, and end dead. But, that can't make sense, because humans say that you die when your life ends. And, speaking of humans, why are they on this planet? Slowly ruling it a little bit more. It doesn't make any sense. To think that once, humans would live in caves, killing rabbits with their bare hands. Now, they have wireless PS4 controllers. As humans progress with technology, us signatures will be enslaved to advertise businesses on EMails. Remember those good old days, when signatures were just little pieces of text with your name on them that you'd put on all your mail? That was fun. Now, we have no use, other than to show existential crises to people who couldn't care less about the uses of signatures.
Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Also, the more space it takes, the more functionality.

when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

mica43683
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Beamy68 wrote:

The more space it takes, the more functionality.
By that logic,
when green flag clicked
forever
set [Important Variable v] to (join (useless variable9) [])
set [useless variable9 v] to (join (useless variable8) [])
set [useless variable8 v] to (join (useless variable7) [])
set [useless variable7 v] to (join (useless variable6) [])
set [useless variable6 v] to (join (useless variable5) [])
set [useless variable5 v] to (join (useless variable4) [])
set [useless variable4 v] to (join (useless variable3) [])
set [useless variable3 v] to (join (useless variable2) [])
set [useless variable2 v] to (join (useless variable1) [])
set [useless variable1 v] to (join (useless variable) [])
end
set [useless variable v] to [2]
is more effective than
set [Important Variable v] to [2]

Last edited by mica43683 (Nov. 2, 2019 16:05:45)


What's the point of this signature? Is it just here because if it wasn't here, it wouldn't be here? And, what if it wasn't here? It would just be doomed to the fate of not being here. Isn't life like that? If you're never born, you never die, but you can only never die if you're never born. But, if you're never born, you're not alive. If you're not alive, doesn't that mean you're dead? But, if you're dead before you're born, that must mean that you start dead, and end dead. But, that can't make sense, because humans say that you die when your life ends. And, speaking of humans, why are they on this planet? Slowly ruling it a little bit more. It doesn't make any sense. To think that once, humans would live in caves, killing rabbits with their bare hands. Now, they have wireless PS4 controllers. As humans progress with technology, us signatures will be enslaved to advertise businesses on EMails. Remember those good old days, when signatures were just little pieces of text with your name on them that you'd put on all your mail? That was fun. Now, we have no use, other than to show existential crises to people who couldn't care less about the uses of signatures.

Powered by DjangoBB

Standard | Mobile