[General] Negative hp regen when no mana.

Status
Not open for further replies.
Are there heroes in your map? They will gain hp/mp regen per second from STR and INT, so you will have to change the value of regeneration these grant in Advanced > Gameplay Constants > Hero Attributes... At what amount of mana should it switch back to using mana instead of health? 1? 10? 100? You just need a simple trigger:
  • Events
    • Time - Every 1.00 seconds of game-time
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true //this cleans a leak in the next line, leave it as is
    • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (actions) else (actions)
          • If - Conditions
            • (Current mana of (Picked Unit)) greater than THRESHOLD //1? 10? 100?
            • -------- this can be found under "Unit - Property" in GUI --------
          • Then - Actions
            • Unit - Set mana of (Picked Unit) to ((Mana of (Picked Unit) - 0.10)
          • Else - Actions
            • Unit - Set life of (Picked Unit) to ((lifeof (Picked Unit) - 0.10)
Don't forget to set mana/life regeneration values for units in the OE to 0 where appropriate (only you know which units you want to regen what amount when).
 
Status
Not open for further replies.
Back
Top