access it like this:\r
\r
local SongLength = GetGlobal("TotalTime")\r
-\r
-After which you can do any sort of actor goodness on it as per usual. EG:\r
-\r
-SongLength:GetText()\r
-SongLength:rainbow()\r
-\r
-etc\r
]]--\r
\r
local GlobalsTable = {}\r
\r
function RegisterGlobal(Actor, Name)\r
- assert(GlobalsTable[Name] == nil, "Cannot register actor ".. name .. ". It has already been registered")\r
- GlobalsTable[Name] = Actor\r
+ assert(GlobalsTable[Name] == nil, "Cannot register actor ".. Name .. ". It has already been registered")\r
+ GlobalsTable[Name] = Actor:GetText()\r
end\r
\r
function GetGlobal(Name)\r
function oitgACoptions()
-- Right now we return the same line names for both OITG and whatever else happens to be running. But in the future they might be different.
- if OPENITG then return "1,2,3,4,5,6,7,8,9,10,11,12" end
+ if OPENITG then return "1,2,3,4,5,6,7,8,9,10,11" end
- return "1,2,3,4,5,6,7,8,9,10,11,12"
+ return "1,2,3,4,5,6,7,8,9,10,11"
end
function SongModifiers()
end
function DisplaySongLength()
- local SongLength = GetGlobal("TotalTime"):GetText()
+ local SongLength = GetGlobal("TotalTime")
+
local RateMod = string.gsub(GetRateMod(), "x" ,"")
local ratio = 1/RateMod
local seconds = string.sub(SongLength, pos+1)
seconds = (seconds + (minutes*60))*ratio
-
+
return string.format("%.2d:%.2d", math.mod(seconds/60,60), math.mod(seconds,60))
end
\ No newline at end of file