Discuss Scratch

_Hope
Scratcher
100+ posts

*touching edge* (separating "edge" into four)

Right now, we have
<touching [edge v] ?>
But that is very general. I think there should be four more “things” added to that dropdown:
-top edge
-right edge
-bottom edge
-left edge
(the direction-wise words can be changed, because “top edge” and the others doesn't sound very right to me) (see adjustment provided by LionsStair below)
I hope the rest is self-explanatory.
Note: I am not proposing the removal of <touching edge?>.

Last edited by _Hope (Jan. 25, 2015 15:50:57)

LionsStair
Scratcher
100+ posts

*touching edge* (separating "edge" into four)

_Hope wrote:

Right now, we have
<touching [edge v] ?>
But that is very general. I think there should be four more “things” added to that dropdown:
-top edge
-right edge
-bottom edge
-left edge
(the direction-wise words can be changed, because “top edge” and the others doesn't sound very right to me)
I hope the rest is self-explanatory.
Maybe instead of right, left, top, bottom, maybe try these:

<touching [positive y edge v] ?>//Top
<touching [negative y edge v] ?>//Bottom
<touching [positive x edge v] ?>//Right
<touching [negative v] ?>//Left

Anyways, I need it for my platform so support!
TheHockeyist
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

Indifferent. But at least it's not as vague as
<touching [that edge v] ? :: sensing>
I support this, yet keeping the touching edge block as an option, because no one wants to do:
<<<touching [that edge v] ? :: sensing> or <touching [that other one v] ? :: sensing>> or <<touching [no this one v] ? :: sensing> or <touching [i meant that one v] ? :: sensing>

Last edited by TheHockeyist (Jan. 25, 2015 15:39:45)

_Hope
Scratcher
100+ posts

*touching edge* (separating "edge" into four)

_Hope wrote:

Right now, we have
<touching [edge v] ?>
But that is very general. I think there should be four more “things” added to that dropdown:
-top edge
-right edge
-bottom edge
-left edge
(the direction-wise words can be changed, because “top edge” and the others doesn't sound very right to me)
I hope the rest is self-explanatory.
Note: I am not proposing the removal of <touching edge?>. (now specified in suggestion)

Last edited by _Hope (Jan. 25, 2015 15:49:41)

_Hope
Scratcher
100+ posts

*touching edge* (separating "edge" into four)

Bump.
Wes64
Scratcher
500+ posts

*touching edge* (separating "edge" into four)

it is possible to write this code with simple boolean expressions.

<<touching [edge v]> and <(x position) > [0]>> //Right edge
<<touching [edge v]> and <(x position) < [0]>> //Left edge
<<touching [edge v]> and <(y position) > [0]>> //Top edge
<<touching [edge v]> and <(y position) < [0]>> //Bottom edge
stickfiregames
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

Wes64 wrote:

it is possible to write this code with simple boolean expressions.

<<touching [edge v]> and <(x position) > [0]>> //Right edge
<<touching [edge v]> and <(x position) < [0]>> //Left edge
<<touching [edge v]> and <(y position) > [0]>> //Top edge
<<touching [edge v]> and <(y position) < [0]>> //Bottom edge
Not always.

<<touching [edge v]> and <(y position) > [0]>> //Top edge
returns true, but the sprite is not touching the top edge.

As far as I can tell, the only way to work around this perfectly is to either use an invisible sprite on each edge, or to store the height and width of every costume on both sides of the centre and use that to calculate it.
Wes64
Scratcher
500+ posts

*touching edge* (separating "edge" into four)

stickfiregames wrote:

Not always.
~image~
<<touching [edge v]> and <(y position) > [0]>> //Top edge
returns true, but the sprite is not touching the top edge.

As far as I can tell, the only way to work around this perfectly is to either use an invisible sprite on each edge, or to store the height and width of every costume on both sides of the centre and use that to calculate it.
shoot, i forgot. you need to define the value based on costume width (assuming costume is centered logically, otherwise you might need offset)
<<touching [edge v]> and <(x position) > ((width) / (2))>> //Right edge
<<touching [edge v]> and <(x position) < ((width) / (-2))>> //Left edge
<<touching [edge v]> and <(y position) > ((height) / (2))>> //Top edge
<<touching [edge v]> and <(y position) < ((height) / (-2))>> //Bottom edge

Last edited by Wes64 (Jan. 26, 2015 23:41:53)

SimonJohn
Scratcher
100+ posts

*touching edge* (separating "edge" into four)

I support.
Letsgopitt
Scratcher
500+ posts

*touching edge* (separating "edge" into four)

I support and thing that “top edge, right edge, etc.” is fine.
_Hope
Scratcher
100+ posts

*touching edge* (separating "edge" into four)

Thank you all!
Pot-of-Gold
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

Sorry if this is a necropost, btw necroposting on suggestions is ok to show your support
support
DaSpudLord
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

Support
scrooge200
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

Or, maybe something like this.

You click the block, then it says “Select Edges”, and you get a diagram of the Stage and you can select which edges you want.
Critic2100
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

scrooge200 wrote:

Or, maybe something like this.

You click the block, then it says “Select Edges”, and you get a diagram of the Stage and you can select which edges you want.
Support for this.
DaSpudLord
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

scrooge200 wrote:

Or, maybe something like this.

You click the block, then it says “Select Edges”, and you get a diagram of the Stage and you can select which edges you want.
No support for that, sounds complicated for new scratchers and not necessary.
matey1234
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

Support!
RethinkingVoxels
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

Bump
Pingas_Official
New Scratcher
5 posts

*touching edge* (separating "edge" into four)

Bump
Steve0Greatness
Scratcher
1000+ posts

*touching edge* (separating "edge" into four)

DaSpudLord wrote:

No support for that, sounds complicated for new scratchers and not necessary.
I disagree.

scrooge200 wrote:

You click the block, then it says “Select Edges”, and you get a diagram of the Stage and you can select which edges you want.
Oh, so you could do

<touching [top or bottom edge and left edge v] ?>

I think having the opposite ends being selected making it an or would make sense, whereas having the parallel edge selected would make it an and, and if all edges are selected, it'd simply say

<touching [any edge v] ?>

Last edited by Steve0Greatness (June 10, 2024 00:54:42)

Powered by DjangoBB