For the Axis I would use a Switch goal just to shut the gate & set the paththough waypoints to allies only as an option. This can be looked at another time.
If you update the waypoints / script I can have a look & see what is wrong.
I learnt by asking questions (a lot of questions) so if there is something you need to know & I (or someone else) has the time I/we can try & answer.
Some of your questions on MapScripts might be answered here