Discuss Scratch

Aboot4
Scratcher
100+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

I've needed this very badly on several projects I've made:
(Distance to x:() y:() ::sensing
Instead, I use a workaround that's a pain, because you have to create a new sprite EVERY TIME YOU USE IT, have it go to that x and y value, then tell the OTHER sprite to test the distance to it. But what if there was an easier way? This block, in my opinion, would be very useful!

What about these edits to already existing sensing blocks?
(Distance to [Nearest Clone v] of [Sprite1 v] ::sensing

(Distance to [Farthest Clone v] of [Sprite1 v] ::sensing

So… support? Feedback/ WORKAROUNDS?! xP
Pot-of-Gold
Scratcher
1000+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

Aboot4 wrote:

I've needed this very badly on several projects I've made:
(Distance to x:() y:() ::sensing // Support. although you could make one sprite go to each location
Instead, I use a workaround that's a pain, because you have to create a new sprite EVERY TIME YOU USE IT, have it go to that x and y value, then tell the OTHER sprite to test the distance to it. But what if there was an easier way? This block, in my opinion, would be very useful!

What about these edits to already existing sensing blocks?
(Distance to [Nearest Clone v] of [Sprite1 v] ::sensing // support

(Distance to [Farthest Clone v] of [Sprite1 v] ::sensing // support

So… support? Feedback/ WORKAROUNDS?! xP
-Io-
Scratcher
1000+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

define distance from x:(x1) y:(y1) to x:(x2) y:(y2)
set [distance v] to ([sqrt v] of ((((x1)-(x2))*((x1)-(x2)))+(((y1)-(y2))*((y1)-(y2)))))
Pythagorean Theorem

Last edited by -Io- (July 3, 2015 03:44:42)

DaSpudLord
Scratcher
1000+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

No support due to the above workaround. Or you could always just move another sprite to that location and record the distance to that sprite.
Aboot4
Scratcher
100+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

-Io- wrote:

define distance from x:(x1) y:(y1) to x:(x2) y:(y2)
set [distance v] to ([sqrt v] of ((((x1)-(x2))*((x1)-(x2)))+(((y1)-(y2))*((y1)-(y2)))))
Pythagorean Theorem
Ah, good call! I didn't think of that!
stickfiregames
Scratcher
1000+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

Support.
Ante22
Scratcher
100+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

Support
samanyolu
Scratcher
1000+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

+1
matey1234
Scratcher
1000+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

+1
Aboot4
Scratcher
100+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

-Io- wrote:

define distance from x:(x1) y:(y1) to x:(x2) y:(y2)
set [distance v] to ([sqrt v] of ((((x1)-(x2))*((x1)-(x2)))+(((y1)-(y2))*((y1)-(y2)))))
Pythagorean Theorem
Except you did it wrong - the “y” section comes first. xP
stickfiregames
Scratcher
1000+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

Aboot4 wrote:

-Io- wrote:

define distance from x:(x1) y:(y1) to x:(x2) y:(y2)
set [distance v] to ([sqrt v] of ((((x1)-(x2))*((x1)-(x2)))+(((y1)-(y2))*((y1)-(y2)))))
Pythagorean Theorem
Except you did it wrong - the “y” section comes first. xP
It makes no difference.
Aboot4
Scratcher
100+ posts

New Sensing Block Ideas (Support? Feedback? Workarounds?)

stickfiregames wrote:

Aboot4 wrote:

-Io- wrote:

define distance from x:(x1) y:(y1) to x:(x2) y:(y2)
set [distance v] to ([sqrt v] of ((((x1)-(x2))*((x1)-(x2)))+(((y1)-(y2))*((y1)-(y2)))))
Pythagorean Theorem
Except you did it wrong - the “y” section comes first. xP
It makes no difference.
Shhhh xP

Powered by DjangoBB