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
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]) endWhere:
Last edited by Prestige (2012-11-29 11:55:21)
Offline