I want a complex tech tree where buildings can become many different buildings. For example... A building that can morph/upgrade into 10 buildings, which can then morph/upgrade into 10 more buildings. What is the best way to do this?
Alternatively, if you can solve the two problems below, I can also do what I need:
- I want a pre-placed unit that can morph (or turn into via other means) into 1 of 10 different buildings. A construction time is still necessary.
- I want to be able to specify a setting on those newly created buildings (via clicking a button on your command bar) to choose a unit to continually produce.
My initial plan was to have a complex tree of morphs and use triggers to spawn units at each specific building, but apparently all morphed relatives share an ability inventory, so this quickly exceeds the cap of 32.
It's strange, I did this easily in WC3 with "Upgrades to" references, but there doesn't seem to be anything similar to this that doesn't hit the ability cap.
The easiest (but not cleanest) way to do this is with a find-and-replace trigger, so that whenever construction is done on a building it instantly deletes itself and then a new building is created at that point. Store the building's life as a variable then set the new buildings life to that value after construction in case the building got attacked during construction. This will get you around your cap of 32. I'm assuming you can't go backwards in upgrades (ie, your buildings function like a Hatchery→Lair upgrade or CC→Orbital in that they can only upgrade one way, not like a Warpgate or Supply Depot).
- Should I use a research and detect when the research completes? Wouldn't that make the user unable to upgrade multiple buildings (since upgrades are 1 time only) across all buildings?
- The buildings plan to have multiple "modes". When in Maine production mode, it will continually produce Marines. While in Marauder mode, it will continually produce Marauders. I was initially planning on having the buildings morph into different unit types (back and forth like a supply depot, as you mentioned). Is there a better way to do this?
This is the first time you've mentioned researches, I thought we were just morphing buildings into new buildings. I don't really understand how researches tie into this. To detect when the find-replace happens, I'd just use "unit is created."
The above system will still work if it's a 2-way morph system, it'll just require twice as many triggers.
Right, I was asking what the building should produce (for me to detect). You think I should create a dummy unit that the building can construct? When this dummy unit is completed, I delete it and replace the building with a new building?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I want a complex tech tree where buildings can become many different buildings. For example... A building that can morph/upgrade into 10 buildings, which can then morph/upgrade into 10 more buildings. What is the best way to do this?
Alternatively, if you can solve the two problems below, I can also do what I need:
- I want a pre-placed unit that can morph (or turn into via other means) into 1 of 10 different buildings. A construction time is still necessary.
- I want to be able to specify a setting on those newly created buildings (via clicking a button on your command bar) to choose a unit to continually produce.
My initial plan was to have a complex tree of morphs and use triggers to spawn units at each specific building, but apparently all morphed relatives share an ability inventory, so this quickly exceeds the cap of 32.
It's strange, I did this easily in WC3 with "Upgrades to" references, but there doesn't seem to be anything similar to this that doesn't hit the ability cap.
@ShadowDestroyer: Go
The easiest (but not cleanest) way to do this is with a find-and-replace trigger, so that whenever construction is done on a building it instantly deletes itself and then a new building is created at that point. Store the building's life as a variable then set the new buildings life to that value after construction in case the building got attacked during construction. This will get you around your cap of 32. I'm assuming you can't go backwards in upgrades (ie, your buildings function like a Hatchery→Lair upgrade or CC→Orbital in that they can only upgrade one way, not like a Warpgate or Supply Depot).
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
@Bilxor: Go
A couple things:
- Should I use a research and detect when the research completes? Wouldn't that make the user unable to upgrade multiple buildings (since upgrades are 1 time only) across all buildings?
- The buildings plan to have multiple "modes". When in Maine production mode, it will continually produce Marines. While in Marauder mode, it will continually produce Marauders. I was initially planning on having the buildings morph into different unit types (back and forth like a supply depot, as you mentioned). Is there a better way to do this?
@ShadowDestroyer: Go
This is the first time you've mentioned researches, I thought we were just morphing buildings into new buildings. I don't really understand how researches tie into this. To detect when the find-replace happens, I'd just use "unit is created."
The above system will still work if it's a 2-way morph system, it'll just require twice as many triggers.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
@Bilxor: Go
Right, I was asking what the building should produce (for me to detect). You think I should create a dummy unit that the building can construct? When this dummy unit is completed, I delete it and replace the building with a new building?