Discuss Scratch
- Discussion Forums
- » Suggestions
- » you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
- rombust
- Scratcher
24 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
- Swampert11
- Scratcher
1000+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
There is already a
As for the bounce block, it cannot know how to bounce in all circumstances. So, I don't support.
block.
if on edge, bounce
As for the bounce block, it cannot know how to bounce in all circumstances. So, I don't support.
Last edited by Swampert11 (July 31, 2016 16:22:55)
Do you know a good project that doesn't have a lot of attention? Suggest a project to be put in this studio that is unpopular.
___________________________________________________________________________________
Only a Scratcher <——– Please look at it!
___________________________________________________________________________________
;
- ErnieParke
- Scratcher
1000+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
Nice suggestion! It sounds like it would be helpful to various Scratchers. The problem I see with a bounce block though is how are you even going to code that? Different people code their bounces differently, and even the code behind it is complex. It could easily be a source of lag for a project, so I don't support.
My thoughts,
ErnieParke
My thoughts,
ErnieParke
- Zacshap21
- Scratcher
100+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
You should be able to put on edge in a if block, then just boulle in another. You could modify it, so on the bounce block, have a drop down menu to set bounce strength to__, set bounce direction to: up, down, left, right, same direction sprite came from. I support it
- seanbobe
- Scratcher
500+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
noSUPPORT.P.S.mySPACEkeyISbroken.SORRY.
- rombust
- Scratcher
24 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
Nice suggestion! It sounds like it would be helpful to various Scratchers. The problem I see with a bounce block though is how are you even going to code that? Different people code their bounces differently, and even the code behind it is complex. It could easily be a source of lag for a project, so I don't support.
My thoughts,
ErnieParke
your right it takes alot of code but its not all active at the same time and it only rarely makes lag
My thoughts,
ErnieParke
your right it takes alot of code but its not all active at the same time and it only rarely makes lag
- drmcw
- Scratcher
1000+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
I think the point ErnieParke was trying to make was that it would be impossible for a bounce script to know how to bounce. The screen edge is easy because it is flat and stationary. Sprites are any shape and can be moving, spinning and represent different masses and elasticity so creating a generic bounce block would be impossible and is the reason we have all those other lovely blocks so we can do it ourselves just how we want. No support I'm afraid. Nice suggestion! It sounds like it would be helpful to various Scratchers. The problem I see with a bounce block though is how are you even going to code that? Different people code their bounces differently, and even the code behind it is complex. It could easily be a source of lag for a project, so I don't support.
My thoughts,
ErnieParke
your right it takes alot of code but its not all active at the same time and it only rarely makes lag
Last edited by drmcw (May 7, 2014 06:48:55)
- cutekids100
- Scratcher
15 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
You can code it like this:
when green flag clicked
forever
if <touching [Sprite2 v] ?> then
bounce
end
end
- seanbobe
- Scratcher
500+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
if <touching color [white(or the color of the background)] ?> then
bounce
end
Last edited by seanbobe (July 18, 2014 19:13:44)
- Mr-scratcher3
- Scratcher
14 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
I tried this duplicate, but unfortunatley @paddle2see* decided to shut me down.
when green flag clicked
forever
if <(Scratch) = [Good]> then
set [Everybody is Happy v] to [true]
else
set [Scratch v] to [Good]
end
<<[Mr-scratcher3] = [:)]> = [true]>
- Ektor31
- New to Scratch
1 post
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
To bounce you can use this :
point in direction (((-1) * (direction)))
- theonlygusti
- Scratcher
1000+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
Yes, you can. To bounce you can use this :point in direction ((-1) * (direction))
- stickfire-helper
- Scratcher
24 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
Yes, if you are bouncing off a vertical line. To bounce you can use this :point in direction (((-1) * (direction)))
It is actually possible to make a script that bounces off a line at any angle, or off a circle. Unfortunately it is not possible to bounce off a complex shape this way, which is why there is not a bounce block and there probably never will be.
- mitopolis
- Scratcher
100+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
SuPpOrT
My signature just ate your evil kumquat!
when green flag clicked
forever
if <I am spamming::sensing>then
Stop Spamming
end
define stop spamming
- 3sal2
- Scratcher
100+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
No, it's not possible. Plus, you'll need calculus for this thing, which Scratch (and probably Flash itself) doesn't support.
- tw1ts1
- Scratcher
9 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
If you you want to make stuff bounce off of whatever just do if touching (whatever) move -10 steps.
- little_kitten
- Scratcher
500+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
No support because if you say forever wait (1) secs, bounce, if it wasn't touching anything, it would bounce off to?
The above post was likely clear sass. 10 outta 10.
Unless it wasn't. Which happens from time to time. Sadly.
- shoresbeep
- Scratcher
1000+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
- cutekids100
- Scratcher
15 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
How about
if touching [Sprite1 v], bounce ::motion?
- lizardz25
- Scratcher
30 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
You could use something like this for bouncing off a red and black line (named Sprite1)
when I receive [ v]I don't know if this will work, but I think it should use direction sensing instead of color sensing for the bounce physics.
repeat until <[w] = [1]>
if <touching color [#ff0000] ?> then
point in direction ((([sqrt maybe? v] of (direction)) * ((90) + (([sqrt? v] of ([direction v] of [Sprite1 v]))))))
end
if <touching color [#000000] ?> then
point in direction ((([sqrt maybe? v] of (direction)) * ((((90) + (([sqrt? v] of ([direction v] of [Sprite1 v])))))) * (-1)))
end
move (3) steps
end
Last edited by lizardz25 (July 31, 2016 13:40:28)
Hello, Stone ge! Who takes the Pandorica takes the bad news, everyone, because g
about, it's r distracting. Could you all just stay still a because I. AM. TALKING! The quest
Answer: I do. xt question, who's co ing to take it from me Come on! Look at me – No plan, no
else: I don't have anything to lose! So, e sitting up there in your silly little spaceshi
the Pandorica tonig t, just remembe g in your way! Remember every b
thing – Let somebody else try fi
Who else misses Matt Smi ?
Amy! Rory! Get in the TARDIS! The kumquats are back!
- Discussion Forums
- » Suggestions
- » you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts