what I need done is this: When a probe creates a building unit, e.g., photon cannon, I need it to be removed and replaced in the same location immediately by another building unit of same size, e.g., floor gun trap or other 2x2 building.
It sounds easy but I need a global trigger or triggers so I don't have to have hundreds of locations all over the map with triggers specific to players and locations.
I believe it was done on a SPAWN D map (a sheild battery would turn into a missile turret) but for the life of me I can't get the triggers right.
here's what I have so far:
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Bring("Current Player", "Protoss Shield Battery", "Anywhere", At least, 1);
Bring("Current Player", "Terran Missile Turret", "P1Change059", At most, 0);
Actions:
Move Location("Current Player", "Protoss Shield Battery", "Anywhere", "P1Change053");
Remove Unit At Location("Current Player", "Protoss Shield Battery", 1, "P1Change053");
Create Unit with Properties("Current Player", "Terran Missile Turret", 1, "P1Change059", 1);
Move Unit("Current Player", "Terran Missile Turret", 1, "P1Change059", "P1Change053");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Bring("Current Player", "Terran Missile Turret", "P1Change059", At least, 1);
Actions:
Move Unit("Current Player", "Terran Missile Turret", 1, "P1Change059", "P1Change053");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Bring("Current Player", "Protoss Shield Battery", "Anywhere", At least, 1);
Bring("Current Player", "Terran Missile Turret", "P1Change059", At least, 1);
Actions:
Move Location("Current Player", "Protoss Shield Battery", "Anywhere", "P1Change053");
Remove Unit At Location("Current Player", "Protoss Shield Battery", 1, "P1Change053");
Display Text Message(Always Display, "\ UNPLACEABLE! MONEY REFUNDED!");
Move Unit("Current Player", "Terran Missile Turret", 1, "P1Change059", "P1Change053");
Set Resources("Current Player", Add, 300, ore);
Preserve Trigger();
}
//-----------------------------------------------------------------//
the locations (P1Change053 etc.) are in space
thx
None.