[Scenario editor] How to make an upgradable hero?

Everyone saw a upgradable heroes in new campaigns. That’s every hero in “The Hautvilles” campaign and Jogaila, Jadwiga and Vytautas in “Jadwiga campaign”. When you attack enemy units and your hero gets more hp and attack/healing rate. I know, it’s easy to “upgrade hero” by using other triggers, but i want to make it like in campaign, by damage to enemy units/buildings. Also, i know that @LordBasse created Jadwiga campaign and @PhillySouljah created Hautvellies. Maybe you can tell how to do it? I would be sooo grateful to you :slightly_smiling_face: :smiling_face_with_three_hearts:

1 Like

Hey! The way I did it for the Jadwiga campaign, which I borrowed from Filthydelphia, was to use two looping triggers:

  1. Check whether the unit is fighting (or in Jadwiga’s case healing or converting)
    Condition: Object Has Action: Attack
    Effect: Change variable “HeroFighting”: +1

  2. Check when the unit has been fighting for a while:
    Condition: Variable Value: “HeroFighting” = 15
    Condition: Variable Value: “HeroLevel” =< 9 (this automatically puts a cap on how far you can level up)
    Effect: Change variable: “HeroFighting” = 0 (reset the counter)
    Effect: Change variable: “HeroLevel” +1
    Effect: Modify attribute: (add the upgrade you want to give to the hero unit here.)
    Effect: Display instructions. “Hero has levelled up!”


Thank you sooo much! I really grateful to you :smiling_face_with_three_hearts: