One of the things my mod calls for is a system where units gain the ability to turn into one of various upgrade options. So, a unit could (upon meeting the requirements) turn into Unit A, Unit B or Unit C. The closest analog for this as far as I can tell is the Zerg Larva.
Thus far, I have duplicated the Larva unit, removed the "death off Creep" and "wander" behaviors and changed its stats and Actor scale slightly. However, its Morph ability does not work as expected. Instead of turning into a Zerg Cocoon and then running through its timer and turning into the resulting unit (I've removed the Requirements and used the Hydralisk for initial testing) it just turns into a cocoon. There's no timer, no cancel, no nothing. It just turns into a cocoon and stops.
I've looked at the abilities and effects of both units and see no obvious differences. I've used both the copy of the Larva - Morph Unit ability and the original ability, and both do the same thing. I can only assume I haven't copied something from the base unit that I would need, or accidentally removed something that passes on the command to change into the specific unit from the Larva to the resulting Cocoon, but I can't determine what I might have removed or not copied.
I'd like some help with either
1. figuring out what might be missing. The only thing I can tell for sure is different is that my copied Larva doesn't have the 'suicide' effect but I can't figure out where that was initially applied.
2. Figure out an easier method for this. I could conceivably make a different Morph ability for each unit I wanted my 'larva' to change into but that seems a little inefficient. Or, maybe copying a different unit like the Zergling would be better?
3. Find a good tutorial that talks about Larva behavior. I found this http://www.sc2mapster.com/forums/resources/tutorials/490-data-making-larva-morph-into-new-zerg-units/ but it doesn't give me any indication of what I might have done wrong
As a side note, It seems like it should be really simple to create a count-down or count-up timer bar (as you see on some units/abilities such as countdowns for when hallucinations or changelings will expire) and I seem to remember finding a field somewhere that controls this behavior but I cannot currently locate it. What is the name of that field?
Thanks for your help! Please let me know if I can provide additional information on what I'm trying to do...
"Display Cooldown" or "(array:) Show Progress" are the progress bar fields.
You should only bother with the Larva if you want the intermediate cocoon stage as a unique unit but shared between all morph paths. Different stats/visuals for different upgrade paths, or jsut plain not having the cocoon, are better handled by individual Morph abilities. A visual-only cocoon with the stats of the old or new unit is easy to do with ModelAddition actors or ModelSwap events.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey everyone,
One of the things my mod calls for is a system where units gain the ability to turn into one of various upgrade options. So, a unit could (upon meeting the requirements) turn into Unit A, Unit B or Unit C. The closest analog for this as far as I can tell is the Zerg Larva.
Thus far, I have duplicated the Larva unit, removed the "death off Creep" and "wander" behaviors and changed its stats and Actor scale slightly. However, its Morph ability does not work as expected. Instead of turning into a Zerg Cocoon and then running through its timer and turning into the resulting unit (I've removed the Requirements and used the Hydralisk for initial testing) it just turns into a cocoon. There's no timer, no cancel, no nothing. It just turns into a cocoon and stops.
I've looked at the abilities and effects of both units and see no obvious differences. I've used both the copy of the Larva - Morph Unit ability and the original ability, and both do the same thing. I can only assume I haven't copied something from the base unit that I would need, or accidentally removed something that passes on the command to change into the specific unit from the Larva to the resulting Cocoon, but I can't determine what I might have removed or not copied.
I'd like some help with either 1. figuring out what might be missing. The only thing I can tell for sure is different is that my copied Larva doesn't have the 'suicide' effect but I can't figure out where that was initially applied. 2. Figure out an easier method for this. I could conceivably make a different Morph ability for each unit I wanted my 'larva' to change into but that seems a little inefficient. Or, maybe copying a different unit like the Zergling would be better? 3. Find a good tutorial that talks about Larva behavior. I found this http://www.sc2mapster.com/forums/resources/tutorials/490-data-making-larva-morph-into-new-zerg-units/ but it doesn't give me any indication of what I might have done wrong
As a side note, It seems like it should be really simple to create a count-down or count-up timer bar (as you see on some units/abilities such as countdowns for when hallucinations or changelings will expire) and I seem to remember finding a field somewhere that controls this behavior but I cannot currently locate it. What is the name of that field?
Thanks for your help! Please let me know if I can provide additional information on what I'm trying to do...
My current project: SCRAP (Scavenge, Collect, Reclaim, Attack, Prevail)
"Display Cooldown" or "(array:) Show Progress" are the progress bar fields.
You should only bother with the Larva if you want the intermediate cocoon stage as a unique unit but shared between all morph paths. Different stats/visuals for different upgrade paths, or jsut plain not having the cocoon, are better handled by individual Morph abilities. A visual-only cocoon with the stats of the old or new unit is easy to do with ModelAddition actors or ModelSwap events.