Ok, I have a set of desires for my Natural Selection map.
Assume that enemy units are unselectable, so left clicking on them will not select them and will rather just trigger a click on the ground.
If you have a unit selected and left click on the ground, I would like the following to happen:
Melee unit - uses basic attack, hitting an enemy right in front of the unit
Ranged unit (missile attack) - Send the missile attack to the location of the cursor, exploding when it reaches target point OR send the missile in a line towards the mouse cursor, exploding on contact with an enemy or a wall
Ranged unit (instant attack) - "Attack" the ground, but if an enemy unit is within a small radius (0.5 or something) of the attack, it will be "hit".
Additionally, holding down the mouse button should continue to fire, rather than requiring a click per attack. This is vital for something like a machine gun because the attack period is so low that you would have to click a hundred times.
I tried a few approaches but couldn't find the right path.
You need to modify the ability through the data editor first, like your ranged attack would be a target point ability and do aoe damage, with marker to make sure it hit only one unit.
issue order to melee attack and what not could be done by trigger
Ok, I have a set of desires for my Natural Selection map.
Assume that enemy units are unselectable, so left clicking on them will not select them and will rather just trigger a click on the ground.
If you have a unit selected and left click on the ground, I would like the following to happen:
Additionally, holding down the mouse button should continue to fire, rather than requiring a click per attack. This is vital for something like a machine gun because the attack period is so low that you would have to click a hundred times.
I tried a few approaches but couldn't find the right path.
@scmapcritic: Go
You need to modify the ability through the data editor first, like your ranged attack would be a target point ability and do aoe damage, with marker to make sure it hit only one unit.
issue order to melee attack and what not could be done by trigger
@progammer: Go
Ok, so effectively I have to make a custom "attack" ability..
Question though, how can I make it so that if a player is holding down the mouse button they will continue firing wherever their cursor moves?
Would also love to know how to do this.
@ST4RKiLL3R: Go
wait for patch 1.2, mousemove function.
Or you could use the CPU heavy workaround where you cover the screen in drones and check where it is using 'Unit is Highlighted'