Discuss Scratch

doggy_boi1
Scratcher
1000+ posts

If touching [ v] bounce block

helloagain_57 wrote:

doggy_boi1 wrote:

helloagain_57 wrote:

SpyCoderX wrote:

helloagain_57 wrote:

jmdzti_0-0 wrote:

helloagain_57 wrote:

BigNate469 wrote:

amagamecode wrote:

Starman99 wrote:

Snip
Well, I also want this block because it also helps us a lot.
if <>, bounce :: motion stack 
But if it's not touching something, then Scratch can't know what to bounce off of. It's literally impossible to make that block.
Just make the sprite flip.
it's not the same.
It's literally the thing that would happen. Anything else would not make sense.
Workaround:
if <> then
turn cw (180) degrees
end
Or
if <> then
point in direction ((direction)+(180))
end
Workarounds are not fun.
this hardly even counts as a workaround. This is literally just a block. we don't need a designated flip or turn 180* block because that already exists
then quote spycoder
?? wdym
helloagain_57
Scratcher
100+ posts

If touching [ v] bounce block

doggy_boi1 wrote:

helloagain_57 wrote:

doggy_boi1 wrote:

helloagain_57 wrote:

SpyCoderX wrote:

helloagain_57 wrote:

jmdzti_0-0 wrote:

helloagain_57 wrote:

BigNate469 wrote:

amagamecode wrote:

Starman99 wrote:

Snip
Well, I also want this block because it also helps us a lot.
if <>, bounce :: motion stack 
But if it's not touching something, then Scratch can't know what to bounce off of. It's literally impossible to make that block.
Just make the sprite flip.
it's not the same.
It's literally the thing that would happen. Anything else would not make sense.
Workaround:
if <> then
turn cw (180) degrees
end
Or
if <> then
point in direction ((direction)+(180))
end
Workarounds are not fun.
this hardly even counts as a workaround. This is literally just a block. we don't need a designated flip or turn 180* block because that already exists
then quote spycoder
?? wdym
yeah he started considering it as a workaround
SpyCoderX
Scratcher
1000+ posts

If touching [ v] bounce block

helloagain_57 wrote:

(#178)

doggy_boi1 wrote:

helloagain_57 wrote:

-snip-
?? wdym
yeah he started considering it as a workaround
I made a workaround that mimics your suggestion exactly.

doggy_boi1 said that my workaround is barely a workaround since its so simple, and that the suggested block isn't needed because its so simple.

doggy_boi1 wrote:

(#175)
we don't need a designated flip or turn 180* block because that already exists

You (helloagain_57) thought that he (doggy_boi1) meant my workaround wasn't a valid workaround and that it should be discounted, which isn't what he was saying.

(Correct me if I'm wrong)

I hope this helps to clear things up.

Last edited by SpyCoderX (Dec. 30, 2024 17:17:26)

helloagain_57
Scratcher
100+ posts

If touching [ v] bounce block

SpyCoderX wrote:

helloagain_57 wrote:

(#178)

doggy_boi1 wrote:

helloagain_57 wrote:

-snip-
?? wdym
yeah he started considering it as a workaround
I made a workaround that mimics your suggestion exactly.

doggy_boi1 said that my workaround is barely a workaround since its so simple, and that the suggested block isn't needed because its so simple.

doggy_boi1 wrote:

(#175)
we don't need a designated flip or turn 180* block because that already exists

You (helloagain_57) thought that he (doggy_boi1) meant my workaround wasn't a valid workaround and that it should be discounted, which isn't what he was saying.

(Correct me if I'm wrong)

I hope this helps to clear things up.
Oh ok. What I was referring is to literally use your workaround to just flip the sprite.
masonhugokingcraft
Scratcher
82 posts

If touching [ v] bounce block

mikey_la_magicien wrote:

what if, a sprite is touching the edge of the screen and we want it to hide or delete itself, then what do we do? because i am trying to fix a podracer game i made, but when the rock reaches the edge, it waits a second or two and then it deletes itself. but i can't seem to get it to work.


here is the link to the game:

https://scratch.mit.edu/projects/395765011/

if <touching [edge v] ?> then
hide
end
mingo-gag
Scratcher
1000+ posts

If touching [ v] bounce block

bump because their was a dupe
trolley_explodes
Scratcher
100+ posts

If touching [ v] bounce block

Starman99 wrote:

I really want a block that is JUST like the "if touching edge, bounce" block that is able to work when you touch ANY sprite, to make it simpler for more basic users to have things bounce on each other.
So like this?
if touching (sprite1 v) then bounce:: motion
amagamecode
Scratcher
500+ posts

If touching [ v] bounce block

trolley_explodes wrote:

Starman99 wrote:

I really want a block that is JUST like the "if touching edge, bounce" block that is able to work when you touch ANY sprite, to make it simpler for more basic users to have things bounce on each other.
So like this?
if touching (sprite1 v) then bounce:: motion
Everyone knows that
amagamecode
Scratcher
500+ posts

If touching [ v] bounce block

9
trolley_explodes
Scratcher
100+ posts

If touching [ v] bounce block

amagamecode wrote:

trolley_explodes wrote:

Starman99 wrote:

I really want a block that is JUST like the "if touching edge, bounce" block that is able to work when you touch ANY sprite, to make it simpler for more basic users to have things bounce on each other.
So like this?
if touching (sprite1 v) then bounce:: motion
Everyone knows that
thats a bit rude.
Cool_kid092
Scratcher
500+ posts

If touching [ v] bounce block

we need
if touching clone of [myself v], bounce ::motion
unknown2467
Scratcher
100+ posts

If touching [ v] bounce block

After 10 pages, this is a duplicate.
BigNate469
Scratcher
1000+ posts

If touching [ v] bounce block

unknown2467 wrote:

After 10 pages, this is a duplicate.
This has way, way more discussion than the other topic (which has 3 posts, including the OP). If anything, they should be merged.
nembence
Scratcher
500+ posts

If touching [ v] bounce block

The problem is that the speed and direction after bouncing depends on the speed, direction and mass of the other sprite. The [if on edge, bounce] block can assume that the edge is static, which makes this much simpler.

Also idk how the block could change the speed of the sprite that runs it
pippy2011eight
Scratcher
500+ posts

If touching [ v] bounce block

This has most likely been suggested before,
but, if you've been on scratch for a while, you've come across this block:
if on edge, bounce
What I'm suggesting is this:
bounce off of [sprite1 v]  :: motion
This will take the direction of the sprite, and make it go the same amount that the “if on edge, bounce” block would move, and it would move in the opposite direction .

PAQ (probably asked questions)
Q: This will be too complex.
A: think of it this way: If scratch had the “bounce” block but not the “if on edge, bounce” block, people would be saying the same thing. This is probably LESS complex, although, I'm not really sure.

Q: You can do this very easily.
A: Yes, but most people won't know how, and not saying HOW to do it won't help either.

Q: What would be the point of this block?
A: To bounce, read the post instead of just posting randomly.

Last edited by pippy2011eight (Oct. 8, 2025 22:58:49)

CodeComet6161
Scratcher
1000+ posts

If touching [ v] bounce block

I'm pretty sure new scratchers would figure this out quickly.
turn cw (90) degrees
pippy2011eight
Scratcher
500+ posts

If touching [ v] bounce block

CodeComet6161 wrote:

I'm pretty sure new scratchers would figure this out quickly.
turn cw (90) degrees
no, it wouldn't change directions, it would just make things MOVE in the oppisite direction but no turning at all
Scratch_Cat_Coder8
Scratcher
1000+ posts

If touching [ v] bounce block

(ORIGINAL ANSWER) No support. This confuses me so much because what would the sprite bounce off of? Where will the sprite go? Im confused. (NEW ANSWER) Support, now knowing that the block can be used to bounce off of other sprites, it makes certain code easier to do and can be easier for newer scratchers.

Last edited by Scratch_Cat_Coder8 (Oct. 8, 2025 22:25:32)

pippy2011eight
Scratcher
500+ posts

If touching [ v] bounce block

Scratch_Cat_Coder8 wrote:

No support. This confuses me so much because what would the sprite bounce off of? Where will the sprite go? Im confused.
it just moves it in the opposite direction, here's an improved version though:

bounce off of [sprite1 v] ::motion
Scratch_Cat_Coder8
Scratcher
1000+ posts

If touching [ v] bounce block

pippy2011eight wrote:

Scratch_Cat_Coder8 wrote:

No support. This confuses me so much because what would the sprite bounce off of? Where will the sprite go? Im confused.
it just moves it in the opposite direction, here's an improved version though:

bounce off of [sprite1 v] ::motion
I change my opinion then, support. (for anyone saying the forum isnt a ballot box, I know, view my previous comment as to why I support)

Powered by DjangoBB