Lua Victory Command not working? [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Lua Victory Command not working? [Solved]

Post 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?
Last edited by Noobasaurus on Mon Oct 24, 2011 11:04 am, edited 1 time in total.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Lua Victory Command not working?

Post by DarthD.U.C.K. »

you have a space between missionvictory and (ATT), that could probably be the problem.
User avatar
Firefang
Major
Major
Posts: 518
Joined: Mon Nov 15, 2010 8:55 pm
Location: California

Re: Lua Victory Command not working?

Post by Firefang »

Do what Duck said and change  

Code: Select all

music02Timer = CreateTimer("music02")
to

Code: Select all

music02Timer = CreateTimer("music02Timer")
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Lua Victory Command not working?

Post 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! :)
Post Reply