Ability that can only target a structure called a "Resource Formation" making sure the structure is an enemy and not neutral or ally. This ability is called "Capture" and has a 10 second interrupt-able cast time. After completing the cast time the target will change ownership to the caster's owner.
I will be working on it a little more with the feedback I have received.
Edited: LaxSalmon had the right idea, but I had to copy the Snipe effect so I would not change the Ghost unit.
I've attempted at what LaxSalmon has said, but the unit (SCV) does not cast it at all.
The issue that I think is happening is the target is a scaled "Rich Mineral Field" and since it is invulnerable it will not work. I thought going under Target Filters and setting "Invulnerable" to "Required" would work. I have changed the "Resource Formations" to player 15 (Hostile) because I want it to require the target to be enemy and not neutral or ally. I am sure the invulnerability is screwing it up for me, but what am I doing wrong?
In the most simple way I want is to have a King of the Hill style map. Each "Resource Formation" can be captured giving the player and their team 10 minerals and 5 vespene gas every 5 seconds (9 total making it 90 minerals and 45 gas every 5 seconds).
To give people a better understanding, check out the map Battle for Sky Fortress. It is a map made by Stark and the Command Centers are exactly what I want but instead of the hero having an item make it an ability given to the SCV, Probe, and Drone. Instead of a Diamondback being created it will be minerals and vespene gas.
Thanks, your first idea on the ability worked, but had to duplicate the effect also. I'll be adding the resource trigger here soon. The Resource Formation did not matter because I allowed the Capture ability to be used on invulnerable targets.
@KingRadical: Go
This is exactly what I want:
Ability that can only target a structure called a "Resource Formation" making sure the structure is an enemy and not neutral or ally. This ability is called "Capture" and has a 10 second interrupt-able cast time. After completing the cast time the target will change ownership to the caster's owner.
I will be working on it a little more with the feedback I have received.
@LaxSalmon: Go
Edited: LaxSalmon had the right idea, but I had to copy the Snipe effect so I would not change the Ghost unit.
I've attempted at what LaxSalmon has said, but the unit (SCV) does not cast it at all.
The issue that I think is happening is the target is a scaled "Rich Mineral Field" and since it is invulnerable it will not work. I thought going under Target Filters and setting "Invulnerable" to "Required" would work. I have changed the "Resource Formations" to player 15 (Hostile) because I want it to require the target to be enemy and not neutral or ally. I am sure the invulnerability is screwing it up for me, but what am I doing wrong?
In the most simple way I want is to have a King of the Hill style map. Each "Resource Formation" can be captured giving the player and their team 10 minerals and 5 vespene gas every 5 seconds (9 total making it 90 minerals and 45 gas every 5 seconds).
To give people a better understanding, check out the map Battle for Sky Fortress. It is a map made by Stark and the Command Centers are exactly what I want but instead of the hero having an item make it an ability given to the SCV, Probe, and Drone. Instead of a Diamondback being created it will be minerals and vespene gas.
@admielke: Go
Well a mineral field cant be owned by anyone. I'd say make it a normal structure and change the model to a rich mineral field instead.
Then u can have a trigger that every 5 seconds picks every Resource Formation and gives its owner and allies 10 mins n 5 gas
@LaxSalmon: Go
Thanks, your first idea on the ability worked, but had to duplicate the effect also. I'll be adding the resource trigger here soon. The Resource Formation did not matter because I allowed the Capture ability to be used on invulnerable targets.