Discuss Scratch

pepeptium
Scratcher
6 posts

Object out of screen

Hello. I am trying to set objects out of visible screen, in order to create clones and the effect of background moving.
The question is that I can not set the object far away than x =240, because the objects stops in the border.
Can you help me to solve it?
Thanks!!!

I would like to make something like this (more modest of course) https://scratch.mit.edu/projects/170774221/#editor (Ground object I mean).

Last edited by pepeptium (Nov. 25, 2017 10:39:24)

GamesFactory_
Scratcher
12 posts

Object out of screen

1 Way:

First, you decrease the size:

set size to (1) %

After you move it:

set size to (1) %
go to x: (1000) y: (...)

or

set size to (1) %
go to x: (-1000) y: (...)

End
pepeptium
Scratcher
6 posts

Object out of screen

I

GamesFactory_ wrote:

1 Way:

First, you decrease the size:

set size to (1) %

After you move it:

set size to (1) %
go to x: (1000) y: (...)

or

set size to (1) %
go to x: (-1000) y: (...)

End
I have just tried but it did not work. Why do you think it would? The object continues stuck in the border
Thanks!!
GamesFactory_
Scratcher
12 posts

Object out of screen

Sorry, I tried : (
mstone326
Scratcher
1000+ posts

Object out of screen

Do you have a project started yet that we can see. It is the easy way out but most use a border to block the off screen tiles. That is quickest way, especially if you are new to Scratch, by the way, welcome to Scratch.

In order to get your clones further than 240 you'll need to use a variable to handle their placement.

Edit, looked at the example project, my response was geared more toward tiles and not full 480x360 sprites. Will advise after a response for a project to view

Last edited by mstone326 (Nov. 25, 2017 13:53:49)

pepeptium
Scratcher
6 posts

Object out of screen

mstone326 wrote:

Do you have a project started yet that we can see. It is the easy way out but most use a border to block the off screen tiles. That is quickest way, especially if you are new to Scratch, by the way, welcome to Scratch.

In order to get your clones further than 240 you'll need to use a variable to handle their placement.

Edit, looked at the example project, my response was geared more toward tiles and not full 480x360 sprites. Will advise after a response for a project to view
Hi, thanks!
https://scratch.mit.edu/projects/188671020/#player
I would like the cat to walk on the orange sand, and red sand (just a test).
But the Object 2 does not go further the stage.
How can I solve it?
PD: After this is solved I will try with clones.
mstone326
Scratcher
1000+ posts

Object out of screen

See if this helps. I commented 2 scripts in there so follow along. And the arrow keys on the cat control scrollX

https://scratch.mit.edu/projects/188700193/
pepeptium
Scratcher
6 posts

Object out of screen

mstone326 wrote:

See if this helps. I commented 2 scripts in there so follow along. And the arrow keys on the cat control scrollX

https://scratch.mit.edu/projects/188700193/
Thank you for your help!!!!!!
It was really nice.
I will show my projects progress
Joshia_T
Scratcher
500+ posts

Object out of screen

try this
when green flag clicked
set [scroll v] to [0]
repeat (number of background costumes)
create clone of [myself v]
next costume
change [scroll v] by (480)
end

when I start as a clone
forever
go to x: ((x)+(scroll)) y: (y) // x y and scroll are "for this sprite only" variables
if <([abs v] of ((x)+(scroll))) > [480]> then
hide
else
show
end
end

hope it helps
(comment on my profile if you need something, I'm don't check the forums too often)
pepeptium
Scratcher
6 posts

Object out of screen

Joshia_T wrote:

try this
when green flag clicked
set [scroll v] to [0]
repeat (number of background costumes)
create clone of [myself v]
next costume
change [scroll v] by (480)
end

when I start as a clone
forever
go to x: ((x)+(scroll)) y: (y) // x y and scroll are "for this sprite only" variables
if <([abs v] of ((x)+(scroll))) > [480]> then
hide
else
show
end
end

hope it helps
(comment on my profile if you need something, I'm don't check the forums too often)
Thanks a lot. I am going to try it!

Powered by DjangoBB