Discuss Scratch

Bluerhinos132
Scratcher
18 posts

Moving sprites FROM the off-screen

Hi, this may sound confusing but I would like to know how to moves sprites coming from the off-screen to it's respective place. I've learned about sprites exiting the screen and I learned that too, but is it possible to have sprites come from the off-screen?

Thanks' for listening.
deck26
Scratcher
1000+ posts

Moving sprites FROM the off-screen

https://scratch.mit.edu/projects/419039062/ shows how to move a sprite on and off screen. Not sure if that's what you mean.
Bluerhinos132
Scratcher
18 posts

Moving sprites FROM the off-screen

Not really, I know how to move sprites off-screen but I want to learn in moving sprites from the off-screen. But I appreciate your effort.

Last edited by Bluerhinos132 (Oct. 1, 2020 10:32:35)

SMKAS
Scratcher
500+ posts

Moving sprites FROM the off-screen

Oh like that, use a local variable for their position instead of using change x and y blocks.


When you want to move them, change the variable of their movement instead. And have a forever loop which has go to x y. x and y are the variables.

Here:
From:
iftouchingright arrow?thenchangexby5
To:
iftouchingright arrow?thenchangeXby5
And have this running.
forevergotox:Xy:Y

Last edited by SMKAS (Oct. 1, 2020 10:36:07)

Just_ng
Scratcher
500+ posts

Moving sprites FROM the off-screen

That wont work…
SMKAS
Scratcher
500+ posts

Moving sprites FROM the off-screen

deck26
Scratcher
1000+ posts

Moving sprites FROM the off-screen

Bluerhinos132 wrote:

Not really, I know how to move sprites off-screen but I want to learn in moving sprites from the off-screen. But I appreciate your effort.
It did only show that, yes, but if you'd added the left arrow key it would allow the sprite to be brought back on screen. I've now modified it to accept left and right arrow keys.

If that's not it you need to explain more what ‘moving from the off-screen’ means.

Last edited by deck26 (Oct. 1, 2020 10:52:10)

Bluerhinos132
Scratcher
18 posts

Moving sprites FROM the off-screen

Thanks guys, I really appreciate it.

Powered by DjangoBB