Discuss Scratch

epicboi17
Scratcher
100+ posts

Touching Any Sprite Boolean

Kaimakiii wrote:

Forgive that reporter, I don't know how to make it drop-down
<touching [any sprite v] ?>
gotchu
MentalBox
Scratcher
100+ posts

Touching Any Sprite Boolean

You can kind of do this by having every sprite as a clone. and then checking if you're touching that sprite (which will include the clones)
blablablahello
Scratcher
1000+ posts

Touching Any Sprite Boolean

MentalBox wrote:

You can kind of do this by having every sprite as a clone. and then checking if you're touching that sprite (which will include the clones)
Yes but every more unique clone (as in behaves diffeerently then the others), would be way harder to code, and normally results in HUGE blocks, which is why people tend to use more sprites. It would be WAY too big of a hassle to use only 1 sprite JUST to check if you are touching any sprite
randomguy3513
Scratcher
1000+ posts

Touching Any Sprite Boolean

support
scratch jr has this so why not scratch it's self
blablablahello
Scratcher
1000+ posts

Touching Any Sprite Boolean

randomguy3513 wrote:

support
scratch jr has this so why not scratch it's self
ALright now THAT is the BEST evidence!
(no but seriously if even scratch jr has it why doesn't scratch?)

This shouldn't be that hard since all sprites (from my knowlegde) should be stored in some sort of list-like object, however, only the inbuilt code HAS that list, we cant access it, and so we dont get to know how much sprites there currently is (if there is ANY clones or ANY added sprites) unless through counting manuelly.
randomguy3513
Scratcher
1000+ posts

Touching Any Sprite Boolean

WantSomeBACON
Scratcher
9 posts

Touching Any Sprite Boolean

when I start as a clone
if <touching [any sprite v] ?> then 
delete this clone
else
move (pick random (1) to (10)) steps
end
qwerty_wasd_gone
Scratcher
1000+ posts

Touching Any Sprite Boolean

<touching [any sprite v] ?>
this is better
<touching [any other sprite v] ?>

Last edited by qwerty_wasd_gone (Sept. 3, 2022 04:48:23)

qwerty_wasd_gone
Scratcher
1000+ posts

Touching Any Sprite Boolean

among_us1w2
Scratcher
1000+ posts

Touching Any Sprite Boolean

no support
from Paddle2See (yez real)
“a workaround is a workaround, and no, gobo. we wont make a gobo cloner.”
Very_Interesting_Bid
Scratcher
500+ posts

Touching Any Sprite Boolean

How about just an option in the touching sprite ? sensing reporter?
<touching sprite [ any v]? :: sensing >
support
cs3868895
Scratcher
1000+ posts

Touching Any Sprite Boolean

bump
medians
Scratcher
1000+ posts

Touching Any Sprite Boolean

medians wrote:

You could just do this:
when green flag clicked
delete all of [sprites v] ::list //and i definitely learned that the dropdown option was moved out by myself
delete all of [touching v] ::list
add [Sprite1] to [sprites v]
add [Sprite2] to [sprites v]
set [index v] to [0]
repeat (length of [sprites v])
change [index v] by (1)
add <touching (item (index) of [sprites v] :: list)?> to [touching v] //i meant in the original post item (index) of sprites
end
You could then detect if the touching list contains anything of a certain value.

unmissable wrote:

I guess this could work, though it would probably be called

<touching [Any] ?>
Would that include the mouse-pointer?

Last edited by medians (April 7, 2023 23:10:11)

medians
Scratcher
1000+ posts

Touching Any Sprite Boolean

Bringing this up due to a duplicate.
Knightbot63
Scratcher
1000+ posts

Touching Any Sprite Boolean

medians wrote:

(#193)-snip-
I don't want tons of variables just for a workaround.

Support, literally, the combinations of this block are very endless.
nam115291-alt-school
Scratcher
23 posts

Touching Any Sprite Boolean

i think im in the middle, in scratch you have to think out of the box to find solutions for problems of your project and this would just ignore this, but it would also be good if it was made, as i can make some games easier to code. be moist
Last edited by kaj (Tomorrow 00:00:00)
medians
Scratcher
1000+ posts

Touching Any Sprite Boolean

Bringing this up.
Would this include all options in the touching block, including these:
PaperMarioFan2022
Scratcher
1000+ posts

Touching Any Sprite Boolean

Support! This could have potential in useful scripts! Meowww! =^..^=

Last edited by PaperMarioFan2022 (May 16, 2023 01:00:30)

INSERT-USER_NAME
Scratcher
1000+ posts

Touching Any Sprite Boolean

medians wrote:

Bringing this up.
Would this include all options in the touching block, including these:
<touching [any sprite v] ?> // Self explanatory
<touching [anything v] ?> // True if touching anything, including the mouse and edge.
jui_pro80
Scratcher
3 posts

Touching Any Sprite Boolean

how my blocks work if you don't know. first go to the my blocks then create one once your done a define will show up its not useless. its what the created block does. put the thing you want to under the define.

define degree 15
sorry if only words showing.

Powered by DjangoBB