I need to iterate the interceptors of a carrier and I can't find the function which gives them. I tried with UnitCargoGroup and UnitInventoryGroup with no avail.
UnitCargoGroup gives an invalid group, and UnitInventoryGroup gives an empty one.
Don't know if this is what you are looking for, but
I created a marine with a custom ability that used the carrier interceptor ability. Renamed the interceptors and allowed the Marine to continue to attack without the need for the interceptros. They were just "back up"
What did is I opened up the unit "Carrier" and studied the links for the abilities, effects, behaviors.
In my marine I linked the exact abilities, effects, and behaviors. Then went and renamed and slightly tweaked everything.
Instead of linking the original, in case you need it for another unit (I did not)
You can just duplicate each ability, effect, behavior and then link the duplications.
I need to iterate the interceptors of a carrier and I can't find the function which gives them. I tried with UnitCargoGroup and UnitInventoryGroup with no avail.
UnitCargoGroup gives an invalid group, and UnitInventoryGroup gives an empty one.
A screen capture of the debugger is attached.
Don't know if this is what you are looking for, but
I created a marine with a custom ability that used the carrier interceptor ability. Renamed the interceptors and allowed the Marine to continue to attack without the need for the interceptros. They were just "back up"
What did is I opened up the unit "Carrier" and studied the links for the abilities, effects, behaviors.
In my marine I linked the exact abilities, effects, and behaviors. Then went and renamed and slightly tweaked everything.
Instead of linking the original, in case you need it for another unit (I did not)
You can just duplicate each ability, effect, behavior and then link the duplications.
A bit late to this, but there are a few methods to reference the Interceptors from the Carriers.
Let's say I want to swap the model of the interceptors to probes.
Method 1
Create a trigger with the Event: Unit Is Created.
Event: Any Unit creates a unit with ability Carrier-Hangar
Action: Actor-Send message "ModelSwap Probe" to actor (Actor for (Created Unit))
Note: The Interceptor in this case is referenced as the Created Unit.
Method 2
Create a dummy Set effect. Name it Interceptor Dummy (for ease of reference)
Under the Effect: Create of the Carrier-Hangar ability, put in Interceptor Dummy.
Next, create a trigger with the event: Effect Used.
Event: Any Player uses Effect Interceptor Dummy
Action: Actor-Send message "ModelSwap Probe" to actor (Actor for (Triggering Effect Unit(Target)))
Note: The Interceptor in this case is referenced as the Triggering Effect Unit(Target).
In conclusion, both methods had the Interceptors' model being swapped with the Probes' model.