Mission victory/defeat on destruction of object?
Moderator: Moderators
- =BloodyRoses=
- Private Recruit
- Posts: 24
- Joined: Sat Jan 17, 2009 4:39 pm
Mission victory/defeat on destruction of object?
Title pretty much self-explanatory. I need to make a map where the objective is to guard/destroy an object which when destroyed triggers endgame. Sorting through the campaign mission objective scripts hasn't helped. Need specific LUAs and coding. Sorry if this has been posted before, can't find it anywhere though.
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: Mission victory/defeat on destruction of object?
A combination of this and the two following LUA functions should do the trick. They should replace PlayAnimation():
The name of the team you want to lose/win should go in between the parentheses, and make sure the names are defined first.
Code: Select all
MissionDefeat()
MissionVictory()- =BloodyRoses=
- Private Recruit
- Posts: 24
- Joined: Sat Jan 17, 2009 4:39 pm
Re: Mission victory/defeat on destruction of object?
That's great, now can someone explain the add points on destruction of object script that AQT mentioned, I'd like a working example since mine isn't working properly.
EDIT
EDIT
I really need this soon. Any help would be appreciated.=BloodyRoses= wrote:That's great, now can someone explain the add points on destruction of object script that AQT mentioned, I'd like a working example since mine isn't working properly.
- Firefang
- Major

- Posts: 518
- Joined: Mon Nov 15, 2010 8:55 pm
- Location: California
Re: Mission victory/defeat on destruction of object?
Code: Select all
killobject = OnObjectKill(
function(object, killer)
if GetEntityName(object) == "objectbeingkillednameinZeroEditor" then
AddAssaultDestroyPoints(killer)
MissionVictory(ATT)
end
end
)-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: Mission victory/defeat on destruction of object?
You could replace ATT with the actual team name, like REP/CIS/IMP/ALL
- Firefang
- Major

- Posts: 518
- Joined: Mon Nov 15, 2010 8:55 pm
- Location: California
Re: Mission victory/defeat on destruction of object?
That works as well, but I used ATT and DEF because they are universal and not limited to one era.
