mirror of
https://github.com/fortressforever/fortressforever-scripts.git
synced 2024-11-28 07:12:00 +00:00
better custom startup() than simply overwriting;
see http://forums.fortress-forever.com/showthread.php?t=23070
This commit is contained in:
parent
66fab40a5c
commit
e1902e6f36
1 changed files with 5 additions and 51 deletions
|
@ -16,59 +16,13 @@ DEFENDERS_OBJECTIVE_ONCAP = true
|
||||||
DEFENDERS_OBJECTIVE_ONCARRIER = false --set to true to follow flag when carried
|
DEFENDERS_OBJECTIVE_ONCARRIER = false --set to true to follow flag when carried
|
||||||
DEFENDERS_OBJECTIVE_ONFLAG = false --set to true to follow flag ALWAYS
|
DEFENDERS_OBJECTIVE_ONFLAG = false --set to true to follow flag ALWAYS
|
||||||
|
|
||||||
|
-- custom startup
|
||||||
|
local startup_base = startup
|
||||||
|
|
||||||
function startup()
|
function startup()
|
||||||
SetGameDescription( "Invade Defend" )
|
startup_base()
|
||||||
|
|
||||||
-- set up team limits
|
|
||||||
local team = GetTeam( Team.kBlue )
|
|
||||||
team:SetPlayerLimit( 0 )
|
|
||||||
|
|
||||||
team = GetTeam( Team.kRed )
|
|
||||||
team:SetPlayerLimit( 0 )
|
|
||||||
|
|
||||||
team = GetTeam( Team.kYellow )
|
|
||||||
team:SetPlayerLimit( -1 )
|
|
||||||
|
|
||||||
team = GetTeam( Team.kGreen )
|
|
||||||
team:SetPlayerLimit( -1 )
|
|
||||||
|
|
||||||
-- CTF maps generally don't have civilians,
|
|
||||||
-- so override in map LUA file if you want 'em
|
|
||||||
local team = GetTeam(Team.kBlue)
|
|
||||||
team:SetClassLimit(Player.kCivilian, -1)
|
|
||||||
|
|
||||||
team = GetTeam(Team.kRed)
|
|
||||||
team:SetClassLimit(Player.kCivilian, -1)
|
|
||||||
|
|
||||||
-- set them team names
|
|
||||||
SetTeamName( attackers, "Attackers" )
|
|
||||||
SetTeamName( defenders, "Defenders" )
|
|
||||||
|
|
||||||
-- start the timer for the points
|
|
||||||
AddScheduleRepeating("addpoints", PERIOD_TIME, addpoints)
|
|
||||||
|
|
||||||
setup_door_timer("start_gate", INITIAL_ROUND_DELAY)
|
|
||||||
|
|
||||||
cp1_flag.enabled = true
|
|
||||||
for i,v in ipairs({"cp1_flag", "cp2_flag", "cp3_flag", "cp4_flag", "cp5_flag", "cp6_flag", "cp7_flag", "cp8_flag"}) do
|
|
||||||
local flag = GetInfoScriptByName(v)
|
|
||||||
if flag then
|
|
||||||
flag:SetModel(_G[v].model)
|
|
||||||
flag:SetSkin(teamskins[attackers])
|
|
||||||
if i == 1 then
|
|
||||||
flag:Restore()
|
|
||||||
else
|
|
||||||
flag:Remove()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
flags_set_team( attackers )
|
|
||||||
|
|
||||||
ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" )
|
|
||||||
UpdateDefendersObjective()
|
|
||||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
|
||||||
|
|
||||||
|
-- palermo specific stuff
|
||||||
-- lower trigger_hurt damage in water
|
-- lower trigger_hurt damage in water
|
||||||
OutputEvent( "trigger_hurt", "SetDamage", "42" )
|
OutputEvent( "trigger_hurt", "SetDamage", "42" )
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue