wyattt
03-15-2009, 06:13 PM
Hello,
I'm attempting to make a Breakout game in AS3. The main thing I am having trouble with is creating custom levels. Creating rows and columns of bricks is easy, but I can't figure out how to make it so I can choose where bricks are/aren't using loops/arrays. I want it to be so where I place a 1 it places a brick and a 0 it doesn't, ie.
var row1:Array=new Array([1,1,1,1,1,1,1,1,1,1,1]);
var row2:Array=new Array([1,0,0,0,0,0,0,0,0,0,1]);
and have the level start out like that. I have a bricks array but I'm just not really sure where to go from here. Any help would be appreciated. Thanks!
I'm attempting to make a Breakout game in AS3. The main thing I am having trouble with is creating custom levels. Creating rows and columns of bricks is easy, but I can't figure out how to make it so I can choose where bricks are/aren't using loops/arrays. I want it to be so where I place a 1 it places a brick and a 0 it doesn't, ie.
var row1:Array=new Array([1,1,1,1,1,1,1,1,1,1,1]);
var row2:Array=new Array([1,0,0,0,0,0,0,0,0,0,1]);
and have the level start out like that. I have a bricks array but I'm just not really sure where to go from here. Any help would be appreciated. Thanks!