Ok, I want to have a timer for my hunt mode, but I don't want it to be the hunt timer. (Woah, that sounded weird.) Like, I want my own timer, and not the one that is there by default, the one which you can change in the map select screen.
hunt.OnStart = function(self)
AddAIGoal(ATT, "Deathmatch", 1000)
AddAIGoal(DEF, "Deathmatch", 1000)
end
hunt:Start()
OnObjectKill(
function(object, killer)
local name = GetEntityName(object)
print("OnObjectKill():",name)
if name == "panel" then
KillObject("Fence4")
end
end
)
OnObjectKill(
function(object, killer)
local name = GetEntityName(object)
print("OnObjectKill():",name)
if name == "panel2" then
PlayAnimation("slide")
end
end
)
end
function ObjectiveTDM:GetGameTimeLimit()
if ( self.isCelebrityDeathmatch or self.isUberMode) then
return 0
else
return ScriptCB_GetHuntMaxTimeLimit()
end
end
Or you can simply set it up as a hero assault (i.e. add in the "isCelebrityDeathmatch" line in the TDM setup as seen in regular HA scripts) and then create your own victory condition with your own timer, which is exactly what you originally tried, but it will have the notable benefit of not crashing your map.
I think your original code needs work, though, because right now the attacking team will always win regardless of points/reinforcements (or maybe that's what you want?).
Re: Remove the hunt timer
Posted: Wed Nov 18, 2009 11:43 pm
by myers73
i havnt spent that much time looking at timers, how would you make it so the team with the most points wins?
Re: Remove the hunt timer
Posted: Thu Nov 19, 2009 8:24 am
by Teancum
ObjectiveTDM.lua handles that for you. As far as putting it into a custom script, I'd look at that lua.