What is wrong with this trigger fragment?
Whenever a hero dies, it is not revived, and the other actions are ignored.
If the hero is still alive, however, the trigger works fine.
Whenever a hero dies, it is not revived, and the other actions are ignored.
If the hero is still alive, however, the trigger works fine.
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(OriginalHero[(Player number of CitysDefenses)] is alive) Equal to True
Then - Actions
Set RandomInteger = (Random integer number between 1 and 3)
If (RandomInteger Equal to 1) then do (Unit - Order Fortress 0258 <gen> to train/upgrade to a Footman) else do (Do nothing)
If (RandomInteger Equal to 1) then do (Unit - Order Arcane Sanctum 0355 <gen> to train/upgrade to a Priest) else do (Do nothing)
If (RandomInteger Equal to 2) then do (Unit - Order Fortress 0258 <gen> to train/upgrade to a Knight) else do (Do nothing)
If (RandomInteger Equal to 2) then do (Unit - Order Arcane Sanctum 0355 <gen> to train/upgrade to a Sorceress) else do (Do nothing)
If (RandomInteger Equal to 3) then do (Unit - Order Fortress 0258 <gen> to train/upgrade to a Rifleman) else do (Do nothing)
If (RandomInteger Equal to 3) then do (Unit - Order Arcane Sanctum 0355 <gen> to train/upgrade to a Spell Breaker) else do (Do nothing)
Else - Actions
Unit - Order Fortress 0258 <gen> to train/upgrade to a (Unit-type of OriginalHero[(Player number of CitysDefenses)])