Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

seed/flood fill doesnt work?

Asked by 9 years ago

KYS YOU ASSES WHO DOWNVOTE THIS SHIT

you can fucking find the problem for yourselves http://www.roblox.com/games/187361696/ROBLOX-Paint-xuerwasd

function fill(frame,bcolor)
    local frameX = 0
    local frameY = 0
    local frame1 = nil 
    for i=1,#frames do
        if frames[i][1]==frame then
            frameX=frames[i][2]
            frameY=frames[i][3]
            frame1=i
        end
    end
    repeat wait() until frame1
    for i=1,#frames do
        if frame1 then
            --print("jesus christ does this work")
            if  (frames[i][3]==frames[frame1][3]-1 and frames[i][1].BackgroundColor3==bcolor) or (frames[i][2]==frames[frame1][2]-1 and frames[i][1].BackgroundColor3==bcolor) or (frames[i][3]==frames[frame1][3]+1 and frames[i][1].BackgroundColor3==bcolor) or (frames[i][2]==frames[frame1][2]+1 and frames[i][1].BackgroundColor3==bcolor) then
                frames[i][1].BackgroundColor3=color
                fill(frames[i][1],bcolor)
                print("filled")
                break
            end
        end
    end
end

Answer this question