I'll probably look dumb here, but did you try to place the SCVs closer to the refinery? I have a custom scenario using the same script as yours (Order workers in Entire map owned by player X to gather nearby resources), but it works fine. I assume that if a worker is slightly closer to a mineral field, it will obviously go for the mineral field. If you want the SCV to collect gas, put it right next to the refinery just to be sure.
If there is no refinery over the geyser yet, it's slightly more complicated. First things first, check that the player building the refinery has enough minerals to do so (if not, "Player - Modify Player Property" is your answer). It may sound stupid but sometimes things like that are easily forgotten...
To order your SCV to build and gather from a refinery, it should be something like this:
Unit - Order "YOUR SCV" to ("BUILD REFINERY" targeting ("THE GEYSER UNIT YOU WANT TO HARVEST" in ("ANY AREA THE GEYSER IS IN" owned by player "Any Player" matching (No Value), with at most Any Amount))) (Replace Existing Orders)
Set a local variable WHATEVER-NAME-YOU-WANT (type: unit) which will refer to the refinery being built.
Add a "Wait for condition" that checks if WHATEVER-NAME-YOU-WANT is complete.
Order any worker (either pick a unit group or select one specific SCV) to "smart command" targeting WHATEVER-NAME-YOU-WANT.
Sorry if I'm not really accurate/precise, maybe I'll post some screenshot later if you need to, but you must know that the script that worked for me was using probes (not SCVs... the main difference being they warp buildings so it goes waaaaay faster) and it was almost a complete build order (with a giant mess of orders, regions, points, waiting conditions, comparisons and other stuff you won't need anyway).
I return back to this problem. I think some triggers have changed in some patches so I'm back at same problem. At this moment only AI I am using is "AI - Start the campaign AI for player 2"
I have done some testing and noticed that if thre are any mineral around 10 squares the SCV will go gather minerals not vespene =( Is there any solution to order SCVs to gather Vespene from Refinery easily? In typical base Vespene and Minerals are very close each other.
Another thing... Why Computer controlled SCV gather only 1 Mineral or Vespene during 1 harvest? Does computer player that is using AI receive default amount of Mineral/Gas per harvest or does it get only 1 Mineral/Gas?
Look at attached map. Let's say that I want 3 SCVs to gather Vespene and rest gather Minerals.
Solved. Right way to order SCV to gather Vespene from Refinery is like "Unit - Order SCV [18.44, 22.54] to (SCV - Gather targeting Refinery [19.50, 27.50]) (Replace Existing Orders)"
Look at this map file if you want to copy working trigger.
OLD POST...
I'll probably look dumb here, but did you try to place the SCVs closer to the refinery? I have a custom scenario using the same script as yours (Order workers in Entire map owned by player X to gather nearby resources), but it works fine. I assume that if a worker is slightly closer to a mineral field, it will obviously go for the mineral field. If you want the SCV to collect gas, put it right next to the refinery just to be sure.
If there is no refinery over the geyser yet, it's slightly more complicated. First things first, check that the player building the refinery has enough minerals to do so (if not, "Player - Modify Player Property" is your answer). It may sound stupid but sometimes things like that are easily forgotten...
To order your SCV to build and gather from a refinery, it should be something like this:
Sorry if I'm not really accurate/precise, maybe I'll post some screenshot later if you need to, but you must know that the script that worked for me was using probes (not SCVs... the main difference being they warp buildings so it goes waaaaay faster) and it was almost a complete build order (with a giant mess of orders, regions, points, waiting conditions, comparisons and other stuff you won't need anyway).
I return back to this problem. I think some triggers have changed in some patches so I'm back at same problem. At this moment only AI I am using is "AI - Start the campaign AI for player 2"
I have done some testing and noticed that if thre are any mineral around 10 squares the SCV will go gather minerals not vespene =( Is there any solution to order SCVs to gather Vespene from Refinery easily? In typical base Vespene and Minerals are very close each other.
Another thing... Why Computer controlled SCV gather only 1 Mineral or Vespene during 1 harvest? Does computer player that is using AI receive default amount of Mineral/Gas per harvest or does it get only 1 Mineral/Gas?
Look at attached map. Let's say that I want 3 SCVs to gather Vespene and rest gather Minerals.
You want the Ability - Resource Aquire field of the Harvest ability. I do not do AI so cant help with that.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Solved. Right way to order SCV to gather Vespene from Refinery is like "Unit - Order SCV [18.44, 22.54] to (SCV - Gather targeting Refinery [19.50, 27.50]) (Replace Existing Orders)"
Look at this map file if you want to copy working trigger.