With some help from SoulFilcher to iron out the details and Verdant, I have managed to successfully create a working Carrier that can drag it's Interceptors like in Brood War.
EDIT: Updated data, fixed major bug where Carrier's were given an attack move and would remove the behaviors from the Interceptors, which was unintended. Code:
Yeah, that's what it does. To me, it feels like BW Carriers but I'll have to do more testing to be 100% sure of that. Basically, the way it works is:
Upon the Carrier issuing the Recall for their Interceptors, the first behavior is applied to all of their Interceptors. If the Interceptors get within the range value in InterceptortoCarrierDistance of their Host Carrier, which is determined by the Recall order(?), then the second behavior that actually reduces their speed is applied. Upon being issued an attack order, both behaviors are removed. The first one is only ever applied again when the Carrier issues another Recall.
EDIT: Now instead of it being removed on an Attack Order, it's removed upon Launch and Retarget. Since it's not considered a Retarget unless the Carrier is actually in range of the target in question, the Interceptors don't lose the behaviors until they get within range of the target. Launch is necessary otherwise they will keep the behaviors all other times, such as returning from an attack without the behavior being removed and then being launched with the behavior thus slowing them down.
That's what I was doing, but validating for anything but Caster doesn't validate for the Interceptor for some reason, unless the Carrier Hangar ability has External checked, and validating for Caster validates for the Carrier not the Interceptor. So I can't validate if the Interceptor itself is in an attack order. The bug in question that I fixed this way was Carriers receiving an attack-move order removed the behavior on their Interceptors, which is unintended as the Interceptors would stop dragging behind the Carrier even though they have no target. I could have fixed that by validating for a point or unit target on the attack order, but this actually fixed the bug in question while that would simply dance around it.
With some help from SoulFilcher to iron out the details and Verdant, I have managed to successfully create a working Carrier that can drag it's Interceptors like in Brood War.
EDIT: Updated data, fixed major bug where Carrier's were given an attack move and would remove the behaviors from the Interceptors, which was unintended. Code:
SC2Mapster Unofficial Discord! - https://discord.gg/DXENztk
So carrier interceptors are slower if in range?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Yeah, that's what it does. To me, it feels like BW Carriers but I'll have to do more testing to be 100% sure of that. Basically, the way it works is:
Upon the Carrier issuing the Recall for their Interceptors, the first behavior is applied to all of their Interceptors. If the Interceptors get within the range value in InterceptortoCarrierDistance of their Host Carrier, which is determined by the Recall order(?), then the second behavior that actually reduces their speed is applied. Upon being issued an attack order, both behaviors are removed. The first one is only ever applied again when the Carrier issues another Recall.
EDIT: Now instead of it being removed on an Attack Order, it's removed upon Launch and Retarget. Since it's not considered a Retarget unless the Carrier is actually in range of the target in question, the Interceptors don't lose the behaviors until they get within range of the target. Launch is necessary otherwise they will keep the behaviors all other times, such as returning from an attack without the behavior being removed and then being launched with the behavior thus slowing them down.
SC2Mapster Unofficial Discord! - https://discord.gg/DXENztk
Why not just use a Combine validator that has your Location Range and a Unit Order Queue validator to see if they are attacking something?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
That's what I was doing, but validating for anything but Caster doesn't validate for the Interceptor for some reason, unless the Carrier Hangar ability has External checked, and validating for Caster validates for the Carrier not the Interceptor. So I can't validate if the Interceptor itself is in an attack order. The bug in question that I fixed this way was Carriers receiving an attack-move order removed the behavior on their Interceptors, which is unintended as the Interceptors would stop dragging behind the Carrier even though they have no target. I could have fixed that by validating for a point or unit target on the attack order, but this actually fixed the bug in question while that would simply dance around it.
SC2Mapster Unofficial Discord! - https://discord.gg/DXENztk
Tried source or target? Else you could use a Set effect and then use the unit targeted by that effect as a reference.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Well, the current data in the OP is working perfectly fine right now as-is.
SC2Mapster Unofficial Discord! - https://discord.gg/DXENztk