-bring men to enemy city
-enemy spawns units
-once all enemy dead around city you get control of it
The issue i'm having is that cities are spawning units twice, once when you initially bring your units, and again when you take the city.
You can run the attached map to see what im talking about.
I think the error has something to do with switches.
Thanks, here are the triggers
CITY SPAWN TRIGGER
Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6","Player 7","Player 8"){
Conditions:
Switch("Switch1", not set);
Bring("Current Player", "Terran Supply Depot", "1", Exactly, 1);
Bring("Foes", "Men", "1", At least, 1);
Actions:
Set Switch("Switch1", set);
Create Unit("Current Player", "Tassadar (Templar)", 3, "1");
Modify Unit Hit Points("Current Player", "Terran Supply Depot", 50, 0, "1");
Display Text Message(Always Display, "Under Attack");
Minimap Ping("1");
Minimap Ping("1");
Preserve Trigger();
Comment("1 spawn");
}
CITY CAPTURE TRIGGER
//-----------------------------------------------------------------//
Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6","Player 7","Player 8"){
Conditions:
Bring("Foes", "Terran Supply Depot", "1", At least, 1);
Bring("Foes", "Men", "1", Exactly, 0);
Bring("Current Player", "Men", "1", At least, 1);
Switch("Switch1", set);
Actions:
Give Units to Player("Foes", "Current Player", "Terran Supply Depot", All, "1");
Modify Unit Hit Points("All players", "Terran Supply Depot", 100, 0, "1");
Display Text Message(Always Display, "We have taken this city");
Preserve Trigger();
Comment("1 capture");
Set Switch("Switch1", clear);
}
CITY DEFENDED TRIGGER
//-----------------------------------------------------------------//
Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6","Player 7","Player 8"){
Conditions:
Bring("Foes", "Men", "1", Exactly, 0);
Bring("Current Player", "Terran Supply Depot", "1", At least, 1);
Switch("Switch1", set);
Actions:
Remove Unit At Location("Current Player", "Tassadar (Templar)", All, "1");
Modify Unit Hit Points("All players", "Terran Supply Depot", 100, 0, "1");
Set Switch("Switch1", clear);
Preserve Trigger();
Comment("1 defended");
}
//-----------------------------------------------------------------//
Attachments: