I don't know if I understand it correctly, but it seems that when you order a unit to attack a point, and the unit acquires a target along its way to that point, the game inserts another order before your attack point order, which orders the unit to attack that target first then attack-move to the point. So the unit originally has 1 order: attack point, and now it has 2 orders. The same thing happens when a unit has no order, and then a target enters its range, the unit suddenly gains 2 orders: attack the target and move back to its original position.
The problem is these order are issued by the game, and in my trigger, I need to remove them. How to do that? I can get all the orders on a unit, but how to tell whether they are issued by the game or a user? Also, I want trigger issued orders to be left untouched as well.
user tells a unit to attack a point (order count on unit is 1: attack point) ->
unit moves towards that point and sees an enemy unit ->
unit attacks the enemy unit (order count becomes 2: order 1: attack the enemy unit;
order 2: attack point;) ->
my trigger kicks in and order unit to move (order count becomes 3: order 1: move;
order 2: attack the enemy unit;
order 3: attack point;)
What I want:
user tells a unit to attack a point (order count on unit is 1: attack point) ->
unit moves towards that point and sees an enemy unit ->
unit attacks the enemy unit (order count becomes 2: order 1: attack the enemy unit;
order 2: attack point;) ->
HERE COMES THE DIFFERENCE
my trigger kicks in and order unit to move (order count remains at 2: order 1: move;
order 2: attack point;)
So as you can see, I want to ignore order 1: attack the enemy unit, because it was issued by the game and not the user. User ordered attack point and my trigger ordered move. I'm not sure where order 1: attack the enemy unit came from, but it's there when my trigger kicks in, and I don't want it; I want my move order to replace it.
But to do so, I need to make sure it's not issued by a user. If it's issued by a user (or a trigger), then I want to keep it. So the problem is, I need a way to check if the order is issued by a user.
This doesn't seem any simpler than my original post, but I'm not really sure what's going on, so I can only describe it to you. My English sucks, but hopefully you can see what I'm talking about.
I don't know if I understand it correctly, but it seems that when you order a unit to attack a point, and the unit acquires a target along its way to that point, the game inserts another order before your attack point order, which orders the unit to attack that target first then attack-move to the point. So the unit originally has 1 order: attack point, and now it has 2 orders. The same thing happens when a unit has no order, and then a target enters its range, the unit suddenly gains 2 orders: attack the target and move back to its original position.
The problem is these order are issued by the game, and in my trigger, I need to remove them. How to do that? I can get all the orders on a unit, but how to tell whether they are issued by the game or a user? Also, I want trigger issued orders to be left untouched as well.
@bignamethefucker: Go
Could you rephrase that?
You want to disable the "auto-attack" order?
Well there should be an entry for that in the data fields of that unit.
And for attack-move..mhm try looking in that ability's data fields.
You should write a simple sentence of what exactly you want to know/have :)
Sorry about my English. Let me try that again.
What happens is this:
What I want:
So as you can see, I want to ignore order 1: attack the enemy unit, because it was issued by the game and not the user. User ordered attack point and my trigger ordered move. I'm not sure where order 1: attack the enemy unit came from, but it's there when my trigger kicks in, and I don't want it; I want my move order to replace it.
But to do so, I need to make sure it's not issued by a user. If it's issued by a user (or a trigger), then I want to keep it. So the problem is, I need a way to check if the order is issued by a user.
This doesn't seem any simpler than my original post, but I'm not really sure what's going on, so I can only describe it to you. My English sucks, but hopefully you can see what I'm talking about.
Let me know if it's still not clear.