Can't get any more simple. I want a right click to issue the attack order instead of move.
I've tried making an "Effect - Target" ability with the "Smart" flag, and it works perfectly. The ability is used on right click instead of Move.
Then I add an "Issue Order" effect to the ability and when I try to use it manually (because it no longer reacts to right click), it just throws the default error for the ability.
The effect has target set as Target Point and unit as Caster. I tried other, less obvious combinations, with no luck. True to data editor tradition, I have no clue what the other fields for the effect do (marker. effect - player, flags).
Copy the "move" and "attack move" abilities (attack move is called "scan move" I think). Disable the "smart" flag on your Move copy, and turn on the smart flag on the Attack Move copy.
They might be two of the same ability in the editor, I've never messed with them, but that's the general way you'd do this.
If you not against using triggers, this will most likely work...
UI - Player Any Player clicks Right mouse button Down.
Unit - Order (Triggering unit) to ( Attack targeting (Point((Mouse X position clicked in the world), (Mouse Y position clicked in the world)))) (Replace Existing Orders)
It has to be done with data. It's more elegant, has better performance and it seems (or seemed?) like a pretty easy modification... I just can't figure out how the Issue Order effect works.
I'm attaching a test map with the ability and effect I made. The marine has two versions of the ability - with and without the effect attached to it. The one without the effect works fine... well, it doesn't do anything, just casts itself at the target point, as soon as I attach the issue order effect, it stops working (throws the default ability error).
Can't get any more simple. I want a right click to issue the attack order instead of move.
I've tried making an "Effect - Target" ability with the "Smart" flag, and it works perfectly. The ability is used on right click instead of Move.
Then I add an "Issue Order" effect to the ability and when I try to use it manually (because it no longer reacts to right click), it just throws the default error for the ability.
The effect has target set as Target Point and unit as Caster. I tried other, less obvious combinations, with no luck. True to data editor tradition, I have no clue what the other fields for the effect do (marker. effect - player, flags).
Hate data editor. Need help.
@Tolkfan: Go
Copy the "move" and "attack move" abilities (attack move is called "scan move" I think). Disable the "smart" flag on your Move copy, and turn on the smart flag on the Attack Move copy.
They might be two of the same ability in the editor, I've never messed with them, but that's the general way you'd do this.
@shardfenix: Go
Move and Attack don't have a Smart flag, they don't have any flags at all. Seems it's all hardcoded.
Bump.
That hard or that obvious? :(
If you not against using triggers, this will most likely work...
UI - Player Any Player clicks Right mouse button Down.
Unit - Order (Triggering unit) to ( Attack targeting (Point((Mouse X position clicked in the world), (Mouse Y position clicked in the world)))) (Replace Existing Orders)
I forgot about this thread...
@Tobin751: Go
It has to be done with data. It's more elegant, has better performance and it seems (or seemed?) like a pretty easy modification... I just can't figure out how the Issue Order effect works.
I'm attaching a test map with the ability and effect I made. The marine has two versions of the ability - with and without the effect attached to it. The one without the effect works fine... well, it doesn't do anything, just casts itself at the target point, as soon as I attach the issue order effect, it stops working (throws the default ability error).