I am trying to make it so that my unit-building structure can no longer build units when my timer reaches 0. I am trying to do this by forcing my structure to use an ability that morphs it into another structure that cannot build units. Then, after some time I want to be able to turn it back into the same unit-building structure and do another count-down. Does anyone have any suggestions as of how to approach this, or more efficient ways of doing this?
You could make an upgrade that doesn't allow the unit producing ability run and then set the upgrade level to 1 via triggers, and then set the level to 0 when you no longer need the upgrade.
You could disable the ability for the structure... or hide the ability completely. Either way would work. And either way would be faster and easier than making a new unit.
Alternatively, you could give the structure a behavior that disables the abilities.
Basic idea is to restrict production of some unit / structure is to use allow / disallow trigger. When timer starts disallow technology you want and allow it when timer expires.
I have done that kind of event for one my maps. (Hand of Humanity: Mission2 if you want to inspect triggers)
I am trying to make it so that my unit-building structure can no longer build units when my timer reaches 0. I am trying to do this by forcing my structure to use an ability that morphs it into another structure that cannot build units. Then, after some time I want to be able to turn it back into the same unit-building structure and do another count-down. Does anyone have any suggestions as of how to approach this, or more efficient ways of doing this?
Do you want any visual changes to the structure or is your goal simply to prevent it from constructing units?
You could make an upgrade that doesn't allow the unit producing ability run and then set the upgrade level to 1 via triggers, and then set the level to 0 when you no longer need the upgrade.
@777iop: Go
Poor Giraffe...
You could disable the ability for the structure... or hide the ability completely. Either way would work. And either way would be faster and easier than making a new unit.
Alternatively, you could give the structure a behavior that disables the abilities.
Okay, I figured out how to do this by using the replace function on my structure. Thanks for the input
Basic idea is to restrict production of some unit / structure is to use allow / disallow trigger. When timer starts disallow technology you want and allow it when timer expires.
I have done that kind of event for one my maps. (Hand of Humanity: Mission2 if you want to inspect triggers)
I link a thread for you:
Timer: http://www.sc2mapster.com/forums/development/triggers/12280-how-to-do-a-simple-timer-solved/