I'm trying to restrict the attack function of comined/morphing units (e.g. Zergling->Baneling, Dark Templar->Archon, Corruptor->Brood Lord). This trigger works for restricting the Attack command of Zerglings when you pick Baneling as your picked unit, but when you modify the trigger to affect Corruptors, it also affects Brood Lords' attack.
EXAMPLE TRIGGER 1 (stops Zerglings from attacking, but allows Banelings to attack (as intended))
Disable Attack-Baneling
Events
Unit - Any Unit creates a unit with ability Any or behavior Any
Local Variables
Conditions
(Unit type of (Created unit)) == Zergling
pickedUnitNames[((Owner of (Created unit)) - 1)] == Baneling
Actions
Unit - Disable the Attack ability for (Created unit)
EXAMPLE TRIGGER 2 (Stops Corruptors from attacking (as intended) but also stops Brood Lords from attacking (unintended).
Disable Attack-Broodlord
Events
Unit - Any Unit creates a unit with ability Any or behavior Any
Local Variables
Conditions
(Unit type of (Created unit)) == Corruptor
pickedUnitNames[((Owner of (Created unit)) - 1)] == Brood Lord
Actions
Unit - Disable the Attack ability for (Created unit)
Curious if anyone knows how I can force it to re-enable attack for Brood Lords while still restricting the attack for corruptors. I've been playing with it for almost 2 hours now and I haven't had any luck with similar triggers set up to Enable brood lord attack.
I'm trying to restrict the attack function of comined/morphing units (e.g. Zergling->Baneling, Dark Templar->Archon, Corruptor->Brood Lord). This trigger works for restricting the Attack command of Zerglings when you pick Baneling as your picked unit, but when you modify the trigger to affect Corruptors, it also affects Brood Lords' attack.
EXAMPLE TRIGGER 1 (stops Zerglings from attacking, but allows Banelings to attack (as intended))
Disable Attack-Baneling
Events
Unit - Any Unit creates a unit with ability Any or behavior Any
Local Variables
Conditions
(Unit type of (Created unit)) == Zergling
pickedUnitNames[((Owner of (Created unit)) - 1)] == Baneling
Actions
Unit - Disable the Attack ability for (Created unit)
EXAMPLE TRIGGER 2 (Stops Corruptors from attacking (as intended) but also stops Brood Lords from attacking (unintended).
Disable Attack-Broodlord
Events
Unit - Any Unit creates a unit with ability Any or behavior Any
Local Variables
Conditions
(Unit type of (Created unit)) == Corruptor
pickedUnitNames[((Owner of (Created unit)) - 1)] == Brood Lord
Actions
Unit - Disable the Attack ability for (Created unit)
Curious if anyone knows how I can force it to re-enable attack for Brood Lords while still restricting the attack for corruptors. I've been playing with it for almost 2 hours now and I haven't had any luck with similar triggers set up to Enable brood lord attack.
The first one work because banelings do not attack, they explode.
For the second, why not just do Disable Attack- Corrupter?
Have you tried using Unit uses ability event? Trigger like that should re-enable attack for brood lords once you morph corruptors into them:
Isn't this the type of thing one should do in the data editor?