It is known that Blizzard allowed the phoenix to attack while moving. However, if the Phoenix is given the attack command, it stops moving. The only way to utilize this ability is to use the Move command and allow the phoenix to choose its target based on the Search result.
Now the problem I'm having is forcing a unit to attack another SPECIFIC unit WHILE moving.
I can order the unit to move, but it chooses it's own target.
I can order the unit to attack a particular unit, but then it stops moving
I cannot order the unit to SIMULTANEOUSLY attack a particular unit and move to a specified point.
Btw I've been trying to solve his on and off for two years.
EDIT:
You can see attached screenshots of my flight simulator in this thread. You'll see my of the Phoenix attack beams firing vertically at targets far away in 3-D, but only because they are very close on the 2D plane. This is the problem and many related to it, that I cannot overcome.
Surely someone must know somethinga bout this problem?
Current workaround I use is making a very small invisible dummy unit follow my moving unit, this unit moves instantly each game loop with the visible unit and does the actual attacking, while the moving visible unit does not, you need to make fine adjustments to make the projectiles emanate from the right spot of the visible unit.
I know jack all about data editing, so take this with a grain of salt, but... isn't this the type of thing where you set a unit to have a 'mover' part and a 'turret' part? You then order the mover to move somewhere and the turret to attack something. I thought that was what allowed you to create units that attack while moving in the first place.
You could probably simulate the weapon with a behavior and use target sorts and a hidden marking behavior to keep track of the target. Something like this:
Behavior shoots at random enemy in range, applies marker1 and uses a target sort to prefer marked targets, so it keeps shooting the first enemy it encounters, until it is out of range.
Unit weapon does no damage and cannot shoot while moving. It applies a marker2 behavior, which takes priority over marker1, so you right-click a target, and the behavior will instantly switch target, as long as that target is in range. The weapon should probably remove previous marker2 targets, or you need to match the marker durations to your attack rate.
Why a behavior over a weapon? Weapons cannot use target sorts (they have a field for target sorts, but it has no effect. This might be fixed in 1.5, though, in which case you can just use a weapon and marker behavior without the damaging behavior). Behavior -> Search Effect with Target Sort should work here.
You can also skip the first marker and just make it prefer the closest unit or whatever, so it will automatically switch targets and not stick to 1 target, unless you specifically attack one.
All of this doesn't work that well, if multiple attackers are involved, though.
if you want the unit to stop when it starts attacking you can also have it apply a behavior to itself that prevents the movement ability for a small period
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
I have not been able to achieve the following.
It is known that Blizzard allowed the phoenix to attack while moving. However, if the Phoenix is given the attack command, it stops moving. The only way to utilize this ability is to use the Move command and allow the phoenix to choose its target based on the Search result.
Now the problem I'm having is forcing a unit to attack another SPECIFIC unit WHILE moving.
I can order the unit to move, but it chooses it's own target.
I can order the unit to attack a particular unit, but then it stops moving
I cannot order the unit to SIMULTANEOUSLY attack a particular unit and move to a specified point.
Btw I've been trying to solve his on and off for two years.
EDIT: You can see attached screenshots of my flight simulator in this thread. You'll see my of the Phoenix attack beams firing vertically at targets far away in 3-D, but only because they are very close on the 2D plane. This is the problem and many related to it, that I cannot overcome.
http://www.sc2mapster.com/forums/development/terrain/24898-a-theory-that-overcomes-the-256x256-map-size-limit/
@EdwardSolomon: Go
???
Surely someone must know somethinga bout this problem?
Current workaround I use is making a very small invisible dummy unit follow my moving unit, this unit moves instantly each game loop with the visible unit and does the actual attacking, while the moving visible unit does not, you need to make fine adjustments to make the projectiles emanate from the right spot of the visible unit.
I know jack all about data editing, so take this with a grain of salt, but... isn't this the type of thing where you set a unit to have a 'mover' part and a 'turret' part? You then order the mover to move somewhere and the turret to attack something. I thought that was what allowed you to create units that attack while moving in the first place.
You could probably simulate the weapon with a behavior and use target sorts and a hidden marking behavior to keep track of the target. Something like this:
Behavior shoots at random enemy in range, applies marker1 and uses a target sort to prefer marked targets, so it keeps shooting the first enemy it encounters, until it is out of range.
Unit weapon does no damage and cannot shoot while moving. It applies a marker2 behavior, which takes priority over marker1, so you right-click a target, and the behavior will instantly switch target, as long as that target is in range. The weapon should probably remove previous marker2 targets, or you need to match the marker durations to your attack rate.
Why a behavior over a weapon? Weapons cannot use target sorts (they have a field for target sorts, but it has no effect. This might be fixed in 1.5, though, in which case you can just use a weapon and marker behavior without the damaging behavior). Behavior -> Search Effect with Target Sort should work here.
You can also skip the first marker and just make it prefer the closest unit or whatever, so it will automatically switch targets and not stick to 1 target, unless you specifically attack one.
All of this doesn't work that well, if multiple attackers are involved, though.
@Kueken531: Go
I'll definitely play with this idea, it has potential to be better than invisible dummy units and negating their epicycles around the main unit.
Does the "weapon: allowed movement" field do anything?
@Gradius12: Go
if you want the unit to stop when it starts attacking you can also have it apply a behavior to itself that prevents the movement ability for a small period
Threat priority.