If you look at the ET map "mp_base" this has the same gate & looks to be based on this map (with an Alien instead???).
Ignore / remove "LimitClass = (1<<CLASS.COVERTOPS)," in the script, as that's an ET thing
This will give you the base to study
If you just want the allies to open & the axis to close you could just use 2 switch goals but you might find the bots fighting over the opening & shutting the gate all map, or just the allies opening the gate may work better? These this would need to be enabled/disabled in the script to stop them just opening/shutting the gate.
You need to disable some of the goals you have created for Teams, Normally I disable all the goals 1st
Util.DisableGoal( ".*", true );
Then enable the goals you want the Teams to use
SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_.*" );
SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_Blue_Flag");
SetAvailableMapGoals( TEAM.AXIS, true, "CAPPOINT_Blue_Flag");
SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_.*" );
SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_Red_Flag");
SetAvailableMapGoals( TEAM.ALLIES, true, "CAPPOINT_Red_Flag");
You will need to create the 2 CAPPOINT goals where the flags are to be taken.
The ROUTE goal is just used to define more than 1 route as a goal from a location i.e. the spawn to flag_goal rather than taking the shortest path (Routing)