Unit Mana Gain

Status
Not open for further replies.
Level 13
Joined
Oct 27, 2008
Messages
1,176
To setup a unit to gain 1 mana ever 5 seconds would be to make all the unit of that type into a variable than have them gain the 1 mana right?
  • Untitled Trigger 002
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set DeathKnight = (Units of type Lord Nightsorrow (Player))
      • Unit - Set mana of Mercanary Barracks 0060 <gen> to ((Mana of Mercanary Barracks 0060 <gen>) + 1.00)
Cause I'm going for a unit that only gains 1 Mana every 5 seconds and no mana gain from its INT
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
With this trigger, all priests will gain 1 mana per 5 seconds. If they had mana to begin with

  • Untitled Trigger 002
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Priest))) and do (Actions)
        • Loop - Actions
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + 1.00)
Or you could remove the destroy group, and add/remove units from the group.
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
Cause with one than more one player with the chance of more than 1 player being the same Hero is why I wanted this.
I'll try this once I can get on the correct computer to edit my map on.
Thanks!
 
Status
Not open for further replies.
Top