@ダイヤル風カウンター --track0:数値長,3,100,3,1 --track1:速度,0,9999,100,0.01 --track2:サイズ,0,800,108,1 --track3:数値間隔,0,1000,100,1 --check0:動き反転,1 --dialog:フォント,local fontN="Consolas";左右切替/chk,chk1=0;カウントダウン/chk,chk2=0;範囲[0で無効],local ptg=0;加減値,local fnm=0;動作[0以上],local spdc=10.0;X範囲係数,local tw=4.0;Y範囲係数,local th=0.5;SEED,sd=100; ------------------------------------set local t0 = math.floor(obj.track0)-1 local t1 = (obj.track1) * 0.01 local t2 = math.floor(obj.track2) local t3 = (obj.track3) * 0.01 ------------------------------------set local sw,sh = obj.screen_w,obj.screen_h local fs = t2 obj.setfont(fontN,fs) ------------------------------------set if(chk1 == 0)then tw,th = fs*tw , fs*th*t0 else tw,th = fs*tw*t0 , fs*th end obj.setoption("drawtarget","tempbuffer",tw,th) local opt0,opt1 if(chk2 == 0)then opt0,opt1 = math.modf(obj.time * t1) else opt0,opt1 = math.modf((math.ceil(obj.totaltime) - obj.time) * t1) end opt1 = math.floor(opt1 * 1000) * 0.001 local len = t0 for i=0,len do if(obj.check0)then dd = i * fs * t3 - len * fs * 0.5 * t3 + opt1^spdc * fs * t3 opt = opt0 + (len * 0.5 - i) else dd = i * fs * t3 - len * fs * 0.5 * t3 - opt1^spdc * fs * t3 opt = opt0 - (len * 0.5 - i) end if(ptg ~= 0)then opt = opt % ptg end obj.load("text",math.floor(opt) + fnm) if(chk1 == 0)then obj.draw(0,dd) else obj.draw(dd) end end obj.load("tempbuffer") @文字列版 --track0:数値長,3,100,3,1 --track1:速度,0,9999,100,0.01 --track2:サイズ,0,800,108,1 --track3:数値間隔,0,1000,100,1 --check0:動き反転,1 --dialog:文字列,local str={"天","地","人","時","利","和"};フォント,local fontN="MS Meiryo";左右切替/chk,chk1=0;カウントダウン/chk,chk2=0;範囲[0で無効],local ptg=0;動作[0以上],local spdc=10.0;X範囲係数,local tw=4.0;Y範囲係数,local th=0.5;SEED,sd=100; ------------------------------------set local t0 = math.floor(obj.track0)-1 local t1 = (obj.track1) * 0.01 local t2 = math.floor(obj.track2) local t3 = (obj.track3) * 0.01 ------------------------------------set local sw,sh = obj.screen_w,obj.screen_h local fs = t2 obj.setfont(fontN,fs) ------------------------------------set if(chk1 == 0)then tw,th = fs*tw , fs*th*t0 else tw,th = fs*tw*t0 , fs*th end obj.setoption("drawtarget","tempbuffer",tw,th) local opt0,opt1 if(chk2 == 0)then opt0,opt1 = math.modf(obj.time * t1) else opt0,opt1 = math.modf((math.ceil(obj.totaltime) - obj.time) * t1) end opt1 = math.floor(opt1 * 1000) * 0.001 local len = t0 for i=0,len do if(obj.check0)then dd = i * fs * t3 - len * fs * 0.5 * t3 + opt1^spdc * fs * t3 opt = opt0 + (len * 0.5 - i) else dd = i * fs * t3 - len * fs * 0.5 * t3 - opt1^spdc * fs * t3 opt = opt0 - (len * 0.5 - i) end if(ptg == 0)then opt = opt % #str else opt = opt % ptg end obj.load("text",str[math.floor(opt) +1]) if(chk1 == 0)then obj.draw(0,dd) else obj.draw(dd) end end obj.load("tempbuffer") --[[http://madeinpc.blog.fc2.com/]]--