getScriptableBlocks

API - gets all of the scriptable blocks on the current background level

return function()
    local level = getBackground();
     
    --give an array of all blocks on the current level
    local scriptBlocks = getScriptableBlocks(); 
    
    log('the list of blocks on ' .. level .. ' are:');
    for i,block in pairs(scriptBlocks) do
        log(block.id);
        log(block.position.x .. ' ' .. block.position.y);
    end
end
pageScriptableBlock

Last updated