Discuss Scratch

TheTrillion
Scratcher
500+ posts

When Sprite Moves Hat Block

In certain projects where another sprite needs to be moved for another sprite to be triggered, this would be useful, although there is a 0 variable workaround that EatNYeet posted, but it might be a bit complex for New Scratchers, but for more advanced Scratchers it is not very hard.

Last edited by TheTrillion (Feb. 22, 2022 23:05:20)

dogsmakemehappy
Scratcher
1000+ posts

When Sprite Moves Hat Block

Bump
dhfbei8987
Scratcher
1000+ posts

When Sprite Moves Hat Block

Trump
dogsmakemehappy
Scratcher
1000+ posts

When Sprite Moves Hat Block

BUMP!!!!!!!! BRING UP MY POST!!!!!!!!!!!!!!!!!!!
dogsmakemehappy
Scratcher
1000+ posts

When Sprite Moves Hat Block

Bump
mybearworld
Scratcher
1000+ posts

When Sprite Moves Hat Block

Socialix wrote:

small][View post]
Scratch Cat's X position is 0. It changes to 10. Since it moved, will it go on forever?
when [timer v] > (1)
Support – I don't really like hat blocks (other than when gf clicked), but this could be massively useful for beginners.

Last edited by mybearworld (April 26, 2021 13:25:06)

7salad3salad
Scratcher
1000+ posts

When Sprite Moves Hat Block

Clones are too confusing to me. this looks more confusing. soo no support.
rdococ
Scratcher
1000+ posts

When Sprite Moves Hat Block

No support. Sprites should only be worried about their own business, and then communicate with each other through touching and broadcasts - very rarely do you need to listen for any changes in value from another sprite, and when you do, a hat block isn't the best way to do it.
dogsmakemehappy
Scratcher
1000+ posts

When Sprite Moves Hat Block

Bump
pedrodrocafranco
Scratcher
500+ posts

When Sprite Moves Hat Block

support.this is a good idea and enjoy a litte workaround of this suggested block
if <(x position) = [0]> then
...
end
dogsmakemehappy
Scratcher
1000+ posts

When Sprite Moves Hat Block

Bump
plqaokwsijeduhrfyg
Scratcher
500+ posts

When Sprite Moves Hat Block

Support, would be very useful in some instances.
dogsmakemehappy
Scratcher
1000+ posts

When Sprite Moves Hat Block

Bump
EatNYeet
Scratcher
500+ posts

When Sprite Moves Hat Block

Just because I'm giving a workaround, it doesn't mean I support or no support.

0 variable workaround. Put these scripts in the sprite that you're detecting movement in.

when green flag clicked
forever
Test movement (x position) (y position)
end

define test movement (x) (y)
wait until <<not <(x position)=(x)>>or<not<(y position)=(y)>>
broadcast [moved v]

Powered by DjangoBB