Lutefisk Mafia
Inscrutable Enforcer
I actually asked this same question last year, and got an answer on how to do this in C++, but I am wondering if it is possible to force a unit to upgrade to a certain type via a python command.
I tried a:
pUnit.upgrade(gc.getInfoTypeForString('UNIT_CHAMPION'))
but nothing happened. Interestingly, it did not cause a python error, though.
Am I missing steps or do I need to use a different syntax? I would really like to avoid doing this the hard way: read out all of the experience and promos for the old unit, create a new unit, give all the same promos and experience, then kill the old unit.
Any advice?
PS - the code block above is showing a gap in the word "Champion" that doesn't really exist.
I tried a:
pUnit.upgrade(gc.getInfoTypeForString('UNIT_CHAMPION'))
but nothing happened. Interestingly, it did not cause a python error, though.
Am I missing steps or do I need to use a different syntax? I would really like to avoid doing this the hard way: read out all of the experience and promos for the old unit, create a new unit, give all the same promos and experience, then kill the old unit.
Any advice?
PS - the code block above is showing a gap in the word "Champion" that doesn't really exist.