You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`local timeElapsed = 0 --left side of the text
local totalTime = 0 --right side of the text
function minutesAndSeconds(number)
local minutes = math.floor(number / 60) --converts the seconds to minutes
local seconds = number % 60 --amount of seconds looping from 0 to 59
if seconds < 10 then
fixedSeconds = 0 .. seconds --adds an extra 0 to always have two digits
else
fixedSeconds = seconds
end
return minutes .. ":" .. fixedSeconds --displays the time as 0:00
end
function onUpdatePost()
timeElapsed = math.floor(getSongPosition() / 1000) --time elapsed in seconds
totalTime = math.floor(songLength / 1000) --total song time in seconds
setProperty("timeTxt.text", minutesAndSeconds(timeElapsed) .. " - " .. minutesAndSeconds(totalTime)) --that's it! :)
end`
this is the best thing i could come up with, should work perfectly fine
Describe your problem here.
Technically, that's how I do it, no need to explain.
Is it possible to do this in Psych Engine 1.0?
And does it really work?
Are you modding a build from source or with Lua?
Lua
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
No response
The text was updated successfully, but these errors were encountered: