Overriding a command in an outside script [Solved]
Posted: Sun Dec 16, 2012 4:42 pm
Recently I've been working on a campaign script and created an objective where the goal is to zero the enemy reinforcements and then I want the game to wait for a few seconds for some voice-over and stuff to play.
However, as far as I've noticed, Battlefront 2 is scripted to immediately declare victory to the team opposing the one that runs out of reinforcements, therefore not giving time for my VO and stuff. I believe this is handled by the code below, located in the Objective.lua
Since I don't want to modify the Objective.lua because it would affect all the gamemodes (Objective.lua lua is the base for all modetypes) I question: Is it possible to override this code from the mission lua (ABCc_c)?
However, as far as I've noticed, Battlefront 2 is scripted to immediately declare victory to the team opposing the one that runs out of reinforcements, therefore not giving time for my VO and stuff. I believe this is handled by the code below, located in the Objective.lua
Code: Select all
--If a team runs out of reinforcements, they lose right away.
--If you want to disable the reinforcement countdown,
--call SetReinforcementCount(teamID, -1)
OnTicketCountChange(
function (team, count)
if count <= 0 then
MissionDefeat(team)
end
end
)
end