To achieve what you are looking for you don't need triggers, instead do this:
Create to identical heal abilities, adjust the target filters on the first one to exclude mechanical and the second one to include mechanical units, then add both abilities to your Medivac and then add the command buttons of both abilities to the command card of that unit, linking each ability to the respective the command button, and put the command button of the heal ability that targets mechanical units on top of the command button of the other heal ability. After that you need to create two requirements (requirement A and requirement B), which will be used to manage which ability the unit with both abilities will be able to use depending on whetehr the upgrade to modify the targets of the heal ability has been researched or not.
For that, go to the requirement field of the of the first upgrade created and open it, which will open the requirement window, within the window make a right click on the folder icon with the word "Use" and select requirement node, then set the "Type" of the added requirement to "Not". Then make a right click on added requirement node and add another requirement node. Set the "Type" field of the new requirement node to "count upgrade", set the "Alias" to your custom requirement (scroll until you fin it), and set the "State" to "Completed". Exit the window hitting "ok". This will be requirement A.
Then you need to create requirement B so go to the requirement field of the of the second upgrade created and open it, then in the requirement window, within the window make a right click on the folder icon with the word "Use" and select requirement node, then set the "Type" field of the added requirement node to "count upgrade", set the "Alias" to your custom requirement, and set the "State" to "Completed". Exit the window hitting "ok". Then open the field of this requirement named "Can be suppressed" and enable the "Use" and "Show" options. This will be requirement B.
After that you need to add each requirement to the respective ability for it to work. For that go to the "Commands" field of the heal ability tha can't heal mechanical units and open the window/panel related to this field, then select the row that has the word "Execute" and add "requirement A" in the requirement section. Then do the same for the ability tha can heal mechanical units, but when you are in the requirement section of the row that has the word "Execute", add "requirement B" instead of "requirement A".
What this will accomplish is that you will have a unit that has two heal abilities (one that doesn't heal mechanical units and one that can do it) that have their command buttons on the same spot, but as long as your custom upgrade is not researched, the ability that your unit will be able to use will be the one that doesn't heal mechanical units and you won't see the command button or be able to use the other healing ability (the one that can heal mechanical units). After researching the upgrade to allow the Medivac to heal mechanical units, the hidden ability that can target mechanical units will efectively replace the former, since its command button will be displayed over the command button of the former heal ability and the unit will lose the ability to use the heal ability that cannot target mechanical units. I hope this help.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
To achieve what you are looking for you don't need triggers, instead do this:
Create to identical heal abilities, adjust the target filters on the first one to exclude mechanical and the second one to include mechanical units, then add both abilities to your Medivac and then add the command buttons of both abilities to the command card of that unit, linking each ability to the respective the command button, and put the command button of the heal ability that targets mechanical units on top of the command button of the other heal ability. After that you need to create two requirements (requirement A and requirement B), which will be used to manage which ability the unit with both abilities will be able to use depending on whetehr the upgrade to modify the targets of the heal ability has been researched or not.
For that, go to the requirement field of the of the first upgrade created and open it, which will open the requirement window, within the window make a right click on the folder icon with the word "Use" and select requirement node, then set the "Type" of the added requirement to "Not". Then make a right click on added requirement node and add another requirement node. Set the "Type" field of the new requirement node to "count upgrade", set the "Alias" to your custom requirement (scroll until you fin it), and set the "State" to "Completed". Exit the window hitting "ok". This will be requirement A.
Then you need to create requirement B so go to the requirement field of the of the second upgrade created and open it, then in the requirement window, within the window make a right click on the folder icon with the word "Use" and select requirement node, then set the "Type" field of the added requirement node to "count upgrade", set the "Alias" to your custom requirement, and set the "State" to "Completed". Exit the window hitting "ok". Then open the field of this requirement named "Can be suppressed" and enable the "Use" and "Show" options. This will be requirement B.
After that you need to add each requirement to the respective ability for it to work. For that go to the "Commands" field of the heal ability tha can't heal mechanical units and open the window/panel related to this field, then select the row that has the word "Execute" and add "requirement A" in the requirement section. Then do the same for the ability tha can heal mechanical units, but when you are in the requirement section of the row that has the word "Execute", add "requirement B" instead of "requirement A".
What this will accomplish is that you will have a unit that has two heal abilities (one that doesn't heal mechanical units and one that can do it) that have their command buttons on the same spot, but as long as your custom upgrade is not researched, the ability that your unit will be able to use will be the one that doesn't heal mechanical units and you won't see the command button or be able to use the other healing ability (the one that can heal mechanical units). After researching the upgrade to allow the Medivac to heal mechanical units, the hidden ability that can target mechanical units will efectively replace the former, since its command button will be displayed over the command button of the former heal ability and the unit will lose the ability to use the heal ability that cannot target mechanical units. I hope this help.