order the unit to attack-move to a location. It'll attack anything it sees on its way. (not sure if it works on gates though)
If that doesn't work go with Boris's solution.
Theory #1 " Gate is a destructible " :
With a periodic event , or any event of your choice, check if the destructible 'Gate' is alive, if yes, pick every unit far from the gate X radius ( for example 500 ) then order it to attack. If the gate is destroyed, either do : 1- Pick every unit from 500 radius from the gate and order it to attack-move behind the gate, OR , create a region and order them to move to it, there are many solutions for this.
Theory #2 ' Gate is a unit ':
Just Order your units to attack-move behind the gate with one of the ways stated above ( using region point or polar offset ) , they will automatically attack the gate 'til they reach units behind it.
Example for polar offset :
- Set Beyond_The_Gate_Point = ( (Position of destructible 'Gate') offset by 600 towards (Gate Facing - 180))
- Unit Group - Pick every unit in Enemies_Group and do multiple actions
- Loop - Actions
- Unit - Issue order unit to attack-move to Beyond_The_Gate_Point
Is the gate consider as destroyed when it is open?
He actually means Units behind the gate, he wasn't sure about the gate alsoThe AI will not auto-target gates, since they are neutral-passive non-units. I've never seen the AI destroy non-tree destructibles.
If the gate is a unit, it must have an attack for the AI to consider it to be worth killing unless no other enemy units are within the acquisition range.
Is the gate consider as destroyed when it is open?
I didn't know you use AI, you had better add a very low attack ( 1 - 1 ) with range 1 ... It would not affect...
He actually means Units behind the gate, he wasn't sure about the gate also
I didn't know you use AI, you had better add a very low attack ( 1 - 1 ) with range 1 ... It would not affect...