This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-11-29 08:34:28

alexanderct
New Scratcher
Registered: 2012-11-29
Posts: 1

How to split screen in 4-ways?

I have a project coming up that requires we split the screen in 4 quadrant/areas.  How do you split the screen 2- or 4-ways in Scratch?  Thanks much.  Alex.

Offline

 

#2 2012-11-29 11:48:37

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: How to split screen in 4-ways?

You'll have to make 4 types of each sprite, and have them occupy a quarter of the screen. If you want to use a general formula to do all 4 quadrants, use this:

(Set the x and y points as if you were playing full screen in single player, set the 4 sprites to have different (identity) variable values, 1 to 4, then to set them to a quadrant:

For sprite n:

if <(identity) = [1]>
set x to (((x position) - [240]) / [2])
set y to (((y position) + [180]) / [2])
end
if <(identity) = [2]>
set x to (((x position) + [240]) / [2])
set y to (((y position) + [180]) / [2])
end
if <(identity) = [3]>
set x to (((x position) - [240]) / [2])
set y to (((y position) - [180]) / [2])
end
if <(identity) = [4]>
set x to (((x position) + [240]) / [2])
set y to (((y position) - [180]) / [2])
end
Where:
1 = top left screen
2 = top right screen
3 = bottom left screen
4 = bottom right screen

Last edited by Prestige (2012-11-29 11:55:21)


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

Board footer