Tutorial: Conquer Game Mode
Posted: Mon Sep 09, 2013 8:48 pm
This is a very fun game mode. Basically it takes the two teams on a conquest map, and puts one of them backed up and starting at one CP, while the other team holds all the other CPs.
Hidden/Spoiler:
Hidden/Spoiler:
So here's a basic script for Coruscant, using the coruscant conquest layer. (This is an advanced tutorial, if you don't know anything it will be very hard for you.)
As you probably noticed, that script right there only lets team 1 be the attacker. If you want team two to be the attacker, here's what you should do.
--Conquer REPATT-v
--this will go in scriptpostload fyi
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"} --defines the cps
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2) --adds cps to objective
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
SetProperty ("cp1", "Team", 2) --VERY IMPORTANT, gives team 1 one cp, and team 2 the rest of the cps
SetProperty ("cp2", "Team", 1) --team1s only cp
SetProperty ("cp3", "Team", 2)
SetProperty ("cp4", "Team", 2)
SetProperty ("cp5", "Team", 2)
SetProperty ("cp6", "Team", 2)
SetProperty ("cp2", "CaptureRegion", "") --this makes team1s cp uncaptureable, because there is no capture zone
--SetProperty ("cp2", "GeometryName", "com_dyn_scp_locked") --this is a feature specific to my 3.5 mod, I added a new cp msh for when the cps were uncaptureable. A giant padlock to show they could not be retaken.
--this little function is what makes the gamemode work
OnFinishCapture( --if any cp is captured then:
function(post, holding)
if GetCommandPostTeam("cp1") == 1 then --if the cp was captured by team 1
SetProperty ("cp1", "CaptureRegion", "") --remove the capture zone (make it uncaptureable)
SetProperty ("cp1", "GeometryName", "com_dyn_scp_locked") --and change it to the padlocked msh.
end
end
)
repeat for each cp that is held by team 2, swapping "cp1" for the name of the different cps
OnFinishCapture(
function(post, holding)
if GetCommandPostTeam("cp3") == 1 then
SetProperty ("cp3", "CaptureRegion", "")
SetProperty ("cp3", "GeometryName", "com_dyn_scp_locked")
end
end
)
OnFinishCapture(
function(post, holding)
if GetCommandPostTeam("cp4") == 1 then
SetProperty ("cp4", "CaptureRegion", "")
SetProperty ("cp4", "GeometryName", "com_dyn_scp_locked")
end
end
)
OnFinishCapture(
function(post, holding)
if GetCommandPostTeam("cp5") == 1 then
SetProperty ("cp5", "CaptureRegion", "")
SetProperty ("cp5", "GeometryName", "com_dyn_scp_locked")
end
end
)
OnFinishCapture(
function(post, holding)
if GetCommandPostTeam("cp6") == 1 then
SetProperty ("cp6", "CaptureRegion", "")
SetProperty ("cp6", "GeometryName", "com_dyn_scp_locked")
end
end
)
conquest:Start()
) --end of ff_AddCommand's parameters
--Conquer REPATT-^
The cool thing about this gamemode is that you can combine both team 1 attacking, team 2 attacking, and regular conquest all onto one mission by using my Multiple game modes on a single map tutorial.
SetProperty ("cp1", "Team", 1) --invert all the team numbers, change 1 to 2 and 2 to 1
SetProperty ("cp2", "Team", 2)
SetProperty ("cp3", "Team", 1)
SetProperty ("cp4", "Team", 1)
SetProperty ("cp5", "Team", 1)
SetProperty ("cp6", "Team", 1)
SetProperty ("cp2", "CaptureRegion", "")
SetProperty ("cp2", "GeometryName", "com_dyn_scp_locked")
OnFinishCapture(
function(post, holding)
if GetCommandPostTeam("cp1") == 2 then --change this from 1 to 2, for each OnFinishCapture function
SetProperty ("cp1", "CaptureRegion", "")
SetProperty ("cp1", "GeometryName", "com_dyn_scp_locked")
end
end
)
Here is the scriptpostload() of coruscant Clone wars conquest from my mod:
Hidden/Spoiler:
Me, CavalryCaptainMike (I'm pretty sure I figured this one out all on my own, if you helped and I forgot, send me a PM)