-- Merci à Spyne pour ses explications ! script_name = "Templae_1" script_description = "templae_lua" script_author = "Rebornuu" script_version = "1.0" local shape = "m 0 100 b 0 100 0 0 100 0 100 0 200 0 200 100 200 100 200 200 100 200 100 200 0 200 0 100 m 20 100 b 20 100 20 180 100 180 100 180 180 180 180 100 180 100 180 20 100 20 100 20 20 20 20 100" function test (line, l) -- N'importe quel nom for si,syl in ipairs(line.syls) do --infade, correspond à start2syl if syl.text~="" then l.layer = 0 -- calque l.start_time = line.start_time-20*syl.duration -- début l.end_time = line.start_time+syl.start_time -- fin l.text=string.format("{\\an5\\bord0\\shad0\\blur6\\move(%d,%d,%d,%d)}%s",syl.center+math.random(-100,50),line.top+math.random(50),syl.center+math.random(50,100),line.bottom+math.random(150),syl.text) io.write_line(l) end end for si,syl in ipairs(line.syls) do -- effet syllabe, correspond à syl if syl.text~="" then l.layer = 0 l.start_time = line.start_time+syl.start_time l.end_time = line.start_time+syl.end_time l.text=string.format("{\\an5\\bord0\\shad0\\blur1\\fscx100\\fscy100\\pos(%d,%d)\t(0,%d\\fscx120\\fscy120)}%s" ,syl.center,syl.middle,syl.duration/2,syl.text) io.write_line(l) end end for si,syl in ipairs(line.syls) do -- effet outfade, correspond à syl2end if syl.text~="" then l.layer=0 l.start_time = line.start_time+syl.end_time l.end_time = line.start_time-20*syl.duration l.text=string.format("{\\an5\\bord0\\shad0\\blur6\\move(%d,%d,%d,%d)}%s" ,syl.center+math.random(-100,50),line.top+math.random(50),syl.center+math.random(50,100),line.bottom+math.random(150),syl.text) io.write_line(l) end end end for li, line in ipairs(lines) do -- Loop pour générer chaque ligne test( line, table.copy(line) ) -- Call flippant function (effects) io.progressbar(li / #lines) -- Update progressbar during the whole process to know how long you've to wait end