| 03-07-2011, 04:39 AM | #1 |
I'm wondering if there is a way to limit the construction of a particular unit (to 1 in this case), while this unit is alive, but has been upgraded into a new (different) unit. IE: If someone wanted to limit the construction of 1x Town Hall per player, even after they have upgrade it to a Keep/Castle (different units) etc. I can't seem to find a way to do this with triggers but i'm still pretty new.. |
| 03-10-2011, 06:12 PM | #2 |
Use a trigger with the generic unit event, with 'unit finishes upgrading' or so, and make it limit the building count of the town hall to 0 then. When the upgraded one is destroyed, set it to 1 again. |
| 03-12-2011, 04:23 AM | #3 |
Thanks! This worked, but I had to make 3 triggers for this.. Seems like there should be a more simplified way though. I'll paste the trigger info if anyone else was curious about this. Trigger: Trigger: Third trigger allows reconstruction of original structure, if destroyed in any original/upgraded form |
| 03-12-2011, 04:24 PM | #4 |
What if it's removed by trigger? I don't think RemoveUnit fires off a unit dies event. It'd be better to use an indexer to track when a unit leaves the map. You could also base a dummy ability on that footman spell like an indexer will internally, because a unit will deactivate it when it is removed, dies, et cetera. |
