In my map, I don't want to use melee or campaign AI. I am trying to get several SCVs in a region to mine from one mineral field. The trigger I am using so far is as follows:
Issue Order To Unit Group
Group: Units In Region Matching Condition
Unit Type: Unit Type From String
String: "SCV"
Region: miner
Player: Any Player
Unit Filter: No Unit Filter
Count: Any Amount
Order: Order Targeting Item
Ability Command: SCV - Gather
Target Item: Rich Mineral Field [44.00, 38.50]
Queue: Replace Existing Orders
However, when I start the map up, I get a trigger error saying the ability SCV-Gather(0) does not have a target. What am I missing?
Thanks.
Why are you getting the unit type from a string conversion? Just choose SCV from "value" (not function).
Also, a mineral field isn't an item. Your order should be targeting a unit.
wOlfLisK's way is probably the simplest way, but you have no real control where the individual units go to gather, etc. Usually that's irrelevant though.
In my map, I don't want to use melee or campaign AI. I am trying to get several SCVs in a region to mine from one mineral field. The trigger I am using so far is as follows:
However, when I start the map up, I get a trigger error saying the ability SCV-Gather(0) does not have a target. What am I missing? Thanks.
@nrpXX137: Go
Unit - Order workers in (Entire map) owned by player 1 to gather nearby resources
This will get all units with the worker flag to start harvesting minerals. Theres no need for all that complicated code :).
Why are you getting the unit type from a string conversion? Just choose SCV from "value" (not function).
Also, a mineral field isn't an item. Your order should be targeting a unit.
wOlfLisK's way is probably the simplest way, but you have no real control where the individual units go to gather, etc. Usually that's irrelevant though.
Awesome. Got it to work finally. I guess I could also put the SCVs I want to mine into a group, but whatev. Thanks!