[HELP] Is it possible a unit become another unit through promotion?

zwei833

Emperor
Joined
Feb 26, 2011
Messages
1,228
In DMS' Denmark civ(http://steamcommunity.com/sharedfiles/filedetails/?id=519153827 ), the Knight UU has a chance to become a dismounted knight when defeated in the battle.

I wonder if it is possible to change the unit type(become another unit, I mean) when getting a specific promotion.

For example, make a new promotion called "sword", and it is only available to Spearmen. When a Spearman pick up this promotion, it immediately becomes a Swordsman, just like unit upgrade. Is this possible?

Hope the mighty coders know to achieve this:D
 
Yes. Use the UnitPromoted event to detect the adoption of the new promotion and then upgrade the old spearman into a swordsman
 
Yes. Use the UnitPromoted event to detect the adoption of the new promotion and then upgrade the old spearman into a swordsman

Thank you whoward? Another question is that is it possible to set a promotion only available to specific unit type, like Spearman? It seem that in SQL/XML, we can only set promotions available with certain UnitCombatType, not UnitType.

Maybe I give Spearman a promotion call "spearmanA" and set "spearmanA" promotion as a requirement of "sword" promotion would work?
 
Top Bottom