I set my enemy miner to build a common ore mine using this code:
Unit ecommonoreminer;
SCRIPT_API void CommonOreMine() {
ecommonoreminer.DoBuild(mapCommonOreMine, LOCATION(120+32, 47-1));
}
I have a trigger to call ecommonoreminer and the miner moves. But it won't build the mine. Could someone tell me what's wrong?
Excuse me while I laugh, but your if statement is:
if (Player[1].Ore() == 9000)
Think of how often you get exact numbers for your metals stored in OP2...
You want to use a greater or equal, not an equals for such a check.
if (Player[1].Ore() >= 9000)