Page 1 of 1

Lua Victory Command not working? [Solved]

Posted: Sun Oct 23, 2011 1:56 pm
by Noobasaurus
At the end of my timer it should give victory to the ATT team. But it doesn't.
Hidden/Spoiler:
[code]
music02Timer = CreateTimer("music02")
SetTimerValue(music02Timer, 600.0)
ShowTimer(music02Timer)
StartTimer(music02Timer)
OnTimerElapse(
function(timer)
MissionVictory (ATT)
ShowTimer(nil)


DestroyTimer(timer)
end,
music02Timer
)[/code]
I've tried to change the mission victory to DEF and neither works. Is that not even the "winning" command?

Re: Lua Victory Command not working?

Posted: Sun Oct 23, 2011 5:17 pm
by DarthD.U.C.K.
you have a space between missionvictory and (ATT), that could probably be the problem.

Re: Lua Victory Command not working?

Posted: Sun Oct 23, 2011 5:30 pm
by Firefang
Do what Duck said and change  

Code: Select all

music02Timer = CreateTimer("music02")
to

Code: Select all

music02Timer = CreateTimer("music02Timer")

Re: Lua Victory Command not working?

Posted: Sun Oct 23, 2011 5:44 pm
by Noobasaurus
Alright, I changed both of those things and I'll test it once the modes are fixed. I was wondering why my two timers weren't working in unison correctly.

EDIT: Thanks, they worked! :)