[Solved] Limited Revive

Level 9
Joined
Mar 26, 2020
Messages
205
Hello hive pips, is it possible to limit to revive a hero? ex: a hero can only be revive twice (since the first is technically trained) and dying thrice can no longer be revive.

im trying to test a trigger where hero can only be field thrice, like fresh-wounded-critical-dead for good stage something like that
 
This should work:
  • Events
    • Unit - A unit Becomes revivable
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Paladin
  • Actions
    • Set Variable Paladin_Revives = (Paladin_Revives - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Paladin_Revives Equal to 0
      • Then - Actions
        • Unit - Remove (Triggering unit) from the game
      • Else - Actions
Paladin_Revives is an Integer variable, set it's initial value to 3.

Alternatively, you could try to change it's Owner to Neutral Passive. That way it's still accessible in the future if you ever wanted to revive it again. Removed units are gone for good.
 
  • Events
    • Unit - A unit Becomes revivable
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Paladin
  • Actions
    • Set Variable Paladin_Revives = (Paladin_Revives - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Paladin_Revives Equal to 0
      • Then - Actions
        • Unit - Remove (Triggering unit) from the game
      • Else - Actions
And indeed it does work, this is exactly what i had in mind, thank you very much Uncle, worked like a charm :thumbs_up:
 
Back
Top