I am trying to make a behavior become active on the Medivac when it picks up a Thor. The only validator I find for this is "Unit compare cargo." Unfortunately, that validator only checks for the size of the cargo. So the behavior will become active regardless if the Medivac loads 8 Marines or 1 Thor... And I only want it to work for the Medivac as long as it carries a Thor.
Any ideas how to overcome this issue? Or is it impossible to validate a specific type of cargo in a transport?
Creat 2 effect, 1 behavior and a validator for each cargo unit type you would like to use. In this example for Thor.
Effect 1 is an apply behavior type effect.
Effect 2 is a remove behavior type effect.
Behavior is a buff type behavior.
Validator is unit type type behavior.
Name effect 1 to Thor Loaded (Apply Behavior)
Name effect 2 to Thor Unloaded (Remove Behavior)
Name Behavior to Thor Cargo
Name validator to Thor Cargo
Set Thor Loaded effect behavior field to Thor Cargo (Behavior)
Set thor Unloaded effect behavior field to Thor Cargo(Behavior)
Set Thor Loaded effect validator field to Thor Cargo(Validator)
Set Thor Unloaded effect validator field to Thor Cargo(Validator)
Set Thor Cargo validator value field to Thor.
Note: This validator unit value in default get the target unit of the ability, in this case the load cargo ability target. You can change it, but for this example you don't need any modification on this field.
Set your load unload ability Load transport effect to Thor loaded(effect) and Unload Transport effect to Thor Unloaded(effect)
Note: the Load cargo field and Unload cargo fields is work the same way than in this tutorial but they give the effect to cargo units not for transport its not required to your solution I just say you If you would like to give behavior to the cargo units later on.
This tutorial solution if you would like to creat behavior depend on cargo type, but not count the number of cargo units. If you woud like to count the number of cargo units, you can set stack count in behavior, and then the effect will creat a stack of behavior every time when a transport unit pick up a unit in a given type and remove 1 stack when transport drop off the cargo unit in a given type.
note: the stack add and remove can be modified in the effect, but in this example you should let it 1 when effect execute.
Note: If you would like to creat multiple unit type, you need to creat a 2 Set type effect too, in this case you must put the Apply Behavior effect to one Set effect and then put the remove behavior type effect to the other Set Effect, and then put these set effects to load/unload ability. Important: Set effect can carry only 10 other effects, but set effects can hold other set effects. So you can creat multiple unit types just listen to the amount of them every started 10 needs a new set effect for exempla if you like 100 you must creat 10 Set effects that includes 10 other effects. on add side and you should creat the same in remove side.
I am trying to make a behavior become active on the Medivac when it picks up a Thor. The only validator I find for this is "Unit compare cargo." Unfortunately, that validator only checks for the size of the cargo. So the behavior will become active regardless if the Medivac loads 8 Marines or 1 Thor... And I only want it to work for the Medivac as long as it carries a Thor.
Any ideas how to overcome this issue? Or is it impossible to validate a specific type of cargo in a transport?
Well since a load ability is like a target ability, I would think a validator that compares the unit type of the target should work.
@Kabelkorven: Go
Creat 2 effect, 1 behavior and a validator for each cargo unit type you would like to use. In this example for Thor.
Effect 1 is an apply behavior type effect.
Effect 2 is a remove behavior type effect.
Behavior is a buff type behavior.
Validator is unit type type behavior.
Name effect 1 to Thor Loaded (Apply Behavior)
Name effect 2 to Thor Unloaded (Remove Behavior)
Name Behavior to Thor Cargo
Name validator to Thor Cargo
Set Thor Loaded effect behavior field to Thor Cargo (Behavior)
Set thor Unloaded effect behavior field to Thor Cargo(Behavior)
Set Thor Loaded effect validator field to Thor Cargo(Validator)
Set Thor Unloaded effect validator field to Thor Cargo(Validator)
Set Thor Cargo validator value field to Thor.
Note: This validator unit value in default get the target unit of the ability, in this case the load cargo ability target. You can change it, but for this example you don't need any modification on this field.
Set your load unload ability Load transport effect to Thor loaded(effect) and Unload Transport effect to Thor Unloaded(effect)
Note: the Load cargo field and Unload cargo fields is work the same way than in this tutorial but they give the effect to cargo units not for transport its not required to your solution I just say you If you would like to give behavior to the cargo units later on.
This tutorial solution if you would like to creat behavior depend on cargo type, but not count the number of cargo units. If you woud like to count the number of cargo units, you can set stack count in behavior, and then the effect will creat a stack of behavior every time when a transport unit pick up a unit in a given type and remove 1 stack when transport drop off the cargo unit in a given type.
note: the stack add and remove can be modified in the effect, but in this example you should let it 1 when effect execute.
Note: If you would like to creat multiple unit type, you need to creat a 2 Set type effect too, in this case you must put the Apply Behavior effect to one Set effect and then put the remove behavior type effect to the other Set Effect, and then put these set effects to load/unload ability. Important: Set effect can carry only 10 other effects, but set effects can hold other set effects. So you can creat multiple unit types just listen to the amount of them every started 10 needs a new set effect for exempla if you like 100 you must creat 10 Set effects that includes 10 other effects. on add side and you should creat the same in remove side.