K, I'll try to explain it to you in a more practical way.
LEt's say we have a mission in which player has to take control over several strategic points. Say, there are 2 villages and one town.
The primary objective is
the capture of the town.
However,
if the player doesn't capture the villages first, the enemy may counterattack from the direction of villages towards the town just being besieged by the player.
Understand until this point?
So, player may not bother seizing the villages, as he wants to complete his task quick and can attack the town firstly, can't he?
It doesn't matter if the villages are conquered, the town is the principal aim and occupation of it means victory.
But, as I said, if the villages arent secure first, the enemy will counterattack instead of watching the players advance kindly.
Let's say the Cell C_1 and C_2 and C_3 are responsible for the attack.
The value of the Cell changes, as the player takes different stepps.
When the village 1 is captured, the
Value of Cell C_1 is 2
When the village 2 is captured, the
Value of Cell C_2 is 2
When both villages are taken, the
Value of Cell C_3 is 1
When both villages are under the enemy control ( actually from the beggining of the map), the
Value of Cell C_3 is 2.
Locations:
1 - Village 1
2 - Village 2
3 - Town
Now let's go to the scripting...
Also, when the enemy holds
at least 1 of the villages he can counterattack. The counterattack is performed when Player reaches the town.
As we know, the enemy holds all the locations from the beggining of the map. That means the villages are not controlled by Player...
Script 1
Code: Alles auswählen
Mission start
-----------
Turn off this trigger.
Let Cell C_3 contain value 2.
Script 2 ( capture of village 1)
Code: Alles auswählen
There are exactly 0 units of player Enemy in location #1.
------------
Turn off this trigger.
Let Cell C_1 contain value 2.
Script 3 ( capture of village 2)
Code: Alles auswählen
There are exactly 0 units of player Enemy in location #2.
------------
Turn off this trigger.
Let Cell C_2 contain 2.
Script 4 (both villages are captured - which means the flank of Player's advance secure)
Code: Alles auswählen
The value of Cell C_1 is exactly 2. and The value of Cell C_2 is exactly 2.
----------------
Turn off this trigger
Let Cell C_3 contain 1
Script 5
Code: Alles auswählen
There are more than 0 units of player Player in location #3. and The value of Cell C_3 is exactly 2.
-----------
Turn off this trigger.
Send reinforcements for player enemy....
This says that when villaes are not taken and Player enters the town (loc. 3), the enemy gets reinforcements to counterattack. Note,
that if Player captures both villages, the Value of Cell C_3 is 1, which means the condition hasn't been fulfilled and therefore the enemy
will not be reinforced.
Got it now?

You can do scripts which will have the same effect as mine, but cells are an easy way to do so, without using damn long scripts.