Page 1 of 1

Converting campaign to conquest for dedicated server manager

Posted: Wed Nov 12, 2014 2:30 pm
by AnthonyBF2
At the time I can setup about 7 or 8 campaign levels that work fully functional on the dedicated server (black bag ops server, not in-game dedicated)

Now, while it is fun to play those, I want to change the general gameplay regular campaign into simple conquest.

I can remove all the objective script lua, codes, etc. So it loads only an empty map, with all the objects used for that level.

I want to ask if anyone can slap some code together where if all the CPs are detected under 1 team's ownership, the map will end. It doesn't have to say victory or defeat for what ever team, map should just end.

On Coruscant Knightfall there are 6 visible CPs, if all belong to 1 team that is when map will end.

I can't just add the conquest scripting (etc AddCommandpost) because this will not match the player's data who joins.
How ever I can add regular scripts in dedicated server sided, and they work for anyone who join(been using Zerted's teleport code for a while)

Thanks.

Re: Converting campaign to conquest for dedicated server man

Posted: Fri Nov 14, 2014 5:21 pm
by [RDH]Zerted
You want something like (not real code):

Code: Select all

OnCommandPostCapture(
    function(cp)
        if GetObjectTeam(cp1) == 1 and GetObjectTeam(cp2) == 1 and GetObjectTeam(cp3) == 1 then
            MissionVictory({1})
        end
    end
)
I forget if it's MissionVictory(1), MissionVictory{1}, or MissionVictory({1}). All are valid Lua code. Look in one of the objective scripts to see which one they use.