I'm running into a problem with my BW carrier micro mod that I can't seem to solve nicely.
It happens when I execute my effect-target ability on a structure in fog. I can identify the case in a switch in data, but I cannot issue a proper order to the unit.
A proper order would be a "right click" on the targeted unit. If you select a marine and right click on a structure in the fog, he will run towards the target's location until he has vision of that structure. If the structure still exists, the Marine will attack it. If it is gone (dead/different position), it will drop the order and execute the next queued command.
Usually I would think that "smart" orders do the right click trick, but I can make it only attack-move the position of the unit using issue order effect. I need to use the "alternate" flag for that and not the "smart" flags, though. Without the "alternate" flag, it doesn't do anything. So, it seems I cannot target the structure covered in fog with issue order. However, the player can do that which reveals that these orders can only be issued via player input and not through any other means.
Btw, triggers can't help me here, it seems. They have no target unit. The right-click on structure in fog results in a target ability without a target unit and without a target point. It only returns a target location. Thus, it is not possible to issue the proper order although triggers can issue "smart command" which is a right click on a unit.
TLDR:
I need an issue order effect that executes a "right click" in data. Issue order effect using attack ability and the smart flag does not work. Triggers cannot solve it as they can't receive the targeted unit and therefore cannot have the correct target. I would need to issue an order that only the player's direct input has access to.
EDIT:
I "solved" my problem just using the attack ability + a trigger. The trigger retargets the interceptors when the ability is used. My initial approach was to use a target-effect-ability that determines what to do with the input which would have required to issue attack orders on structures withint he fog. Thus, I'm working around the fact that you cannot issue orders to structures in fog.
To get rid of my trigger, I would require effects to be executed on different stages of the attack ability: approaching and executing. That's when my trigger orders the carrier to retarget its interceptors using a transient ability, if the target unit != null, visible and within the hangar's leash range.
I'm running into a problem with my BW carrier micro mod that I can't seem to solve nicely.
It happens when I execute my effect-target ability on a structure in fog. I can identify the case in a switch in data, but I cannot issue a proper order to the unit.
A proper order would be a "right click" on the targeted unit. If you select a marine and right click on a structure in the fog, he will run towards the target's location until he has vision of that structure. If the structure still exists, the Marine will attack it. If it is gone (dead/different position), it will drop the order and execute the next queued command.
Usually I would think that "smart" orders do the right click trick, but I can make it only attack-move the position of the unit using issue order effect. I need to use the "alternate" flag for that and not the "smart" flags, though. Without the "alternate" flag, it doesn't do anything. So, it seems I cannot target the structure covered in fog with issue order. However, the player can do that which reveals that these orders can only be issued via player input and not through any other means.
Btw, triggers can't help me here, it seems. They have no target unit. The right-click on structure in fog results in a target ability without a target unit and without a target point. It only returns a target location. Thus, it is not possible to issue the proper order although triggers can issue "smart command" which is a right click on a unit.
TLDR:
I need an issue order effect that executes a "right click" in data. Issue order effect using attack ability and the smart flag does not work. Triggers cannot solve it as they can't receive the targeted unit and therefore cannot have the correct target. I would need to issue an order that only the player's direct input has access to.
EDIT:
I "solved" my problem just using the attack ability + a trigger. The trigger retargets the interceptors when the ability is used. My initial approach was to use a target-effect-ability that determines what to do with the input which would have required to issue attack orders on structures withint he fog. Thus, I'm working around the fact that you cannot issue orders to structures in fog.
To get rid of my trigger, I would require effects to be executed on different stages of the attack ability: approaching and executing. That's when my trigger orders the carrier to retarget its interceptors using a transient ability, if the target unit != null, visible and within the hangar's leash range.