What I need is to have someone take a look at my "I'm-at-work-and-can't-test-it" code and see if my Lua-fu is good enough to get this to work.
Code: Select all
function ScriptPostLoad()
--Here is our array of VO file strings to call
currentVO = { "vo1", "vo2", "vo3", "vo4", vo5", "vo6" }
function PlayTheVO()
local a
for a = 1, table.getn(currentVO) do
--Broadcast the current voice over file
BroadcastVoiceOver([currentVO]a, REP)
--Show what VO file we're playing on-screen
ShowMessageText([currentVO]a, REP)
--Dump the same info to BFront2.log
Print([currentVO]a)
end
VOstartTimer= CreateTimer("VOstartTimer")
SetTimerValue(VOstartTimer, 4) --wait four seconds to start
StartTimer(VOstartTimer)
OnTimerElapse(
function(PlayTheVO())
DestroyTimer(VOstartTimer)
end,
VOstartTimer
)


