• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[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