This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
local h, m, s
function secs2hms(v)
h = math.floor(v / 3600)
m = math.floor(v % 3600 / 60)
s = math.floor(v % 3600 % 60)
-- + --
print( h .. ":" .. m .. ":" .. s )
end
local d, h, m, s
function secondsToTime(v)
d = math.floor(v / 86400)
h = math.floor(v % 86400 / 3600)
m = math.floor(v % 3600 / 60)
s = math.floor(v % 3600 % 60)
-- + --
print( d .. ":" .. h .. ":" .. m .. ":" .. s )
end
local d, h, m, s -- empty variables which will be used for storing the split time values
-- function for converting seconds to time format (hh:mm:ss)
function secs2hms(v)
h = math.floor(v / 3600)
m = math.floor(v % 3600 / 60)
s = math.floor(v % 3600 % 60)
-- + --
if h < 10 then h = tostring("0" .. h) end
if m < 10 then m = tostring("0" .. m) end
if s < 10 then s = tostring("0" .. s) end
-- + --
print( h .. ":" .. m .. ":" .. s )
end
-- function for converting seconds to time format (dd:hh:mm:ss)
function secondsToTime(v)
d = math.floor(v / 86400)
h = math.floor(v % 86400 / 3600)
m = math.floor(v % 3600 / 60)
s = math.floor(v % 3600 % 60)
-- + --
if d < 10 then d = tostring("0" .. d) end
if h < 10 then h = tostring("0" .. h) end
if m < 10 then m = tostring("0" .. m) end
if s < 10 then s = tostring("0" .. s) end
-- + --
print( d .. ":" .. h .. ":" .. m .. ":" .. s )
end
This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
New threadDeponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For more scenes there is Visionaire Studio PRO from €75, and to sell your game the Indie Bundle for €99.
Through December 1: all licenses 30% off, for example the Indie Bundle for €69.30 instead of €99. Applied automatically at checkout.