Hiya,
I am working my way through the breakout tutorial and I am having trouble cloning my block template.
I have the following code
// Create Blocks
var blockTypes = ['72248.jpg', '72811.jpg', '72903.jpg', '72996.jpg', '73184.jpg', '73221.jpg', '73269.jpg', '73405.jpg', '73450.jpg'];
for(var i=0; i<4; i++);
{
for(var j=0; j<3; j++)
{
var newBlock = wade.getSceneObject('TemplateBook').clone();
newBlock.setPosition((i-1)*75, -250 + j*115);
wade.addSceneObject(newBlock, true);
var type = blockTypes[Math.floor(Math.random()*4)];
newBlock.getSprite().setImageFile(type);
}
}
});
I can't seem to get 4 blocks in a horizontal row, it shows only 1, however the vertical blocks are showing as desired (3 blocks in a column).
Can you advise where I am going wrong?