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

#1 2012-03-11 13:43:28

Voicebash
New Scratcher
Registered: 2012-03-11
Posts: 2

Scratch School Project

Hello!

In advance I'd like to say thank you for helping me with this!

Basically I have to make a program that asks the user for the length and width of a room that has to have tiles placed in it. The tiles are 35x35. Then the program has to work out the area of the room (length x width) I have the area worked out that was easy for me. The program must then draw the room based on the dimentions which I also got right. Once that is done the program must fill the room with those 35x35 tiles. This is where I am stuck. I have got absolutely no clue on how to do this. It can fill the tiles on the first level but the program doesnt know when to move up to the next level of tiles.

Again,much appreciated with the help

Offline

 

#2 2012-03-11 13:59:03

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Scratch School Project

By next level do you mean a new row or column?

What I would do is something like this:

when I receive [tiles v]
set y to  (((width) / (-2)) * (35))
repeat (width)
  set x to (((length) / (-2)) * (35))
  repeat (length)
    stamp
    change x by (35)
  end
  change y by (35)
end

Last edited by AtomicBawm3 (2012-03-11 14:02:06)


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#3 2012-03-11 14:14:41

Voicebash
New Scratcher
Registered: 2012-03-11
Posts: 2

Re: Scratch School Project

I mean a new row  smile  Also I made the sprite draw the individual 35x35 tile but I think your method of actually stamping would work better  smile

Offline

 

Board footer