• 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.

how to set mana/health on a group?

Status
Not open for further replies.
Level 2
Joined
Sep 30, 2007
Messages
20
heres my trigger:
The Super Secret Mana Drainer of DOOM
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Arthas + Dummy = Doom
  • Actions
    • Set Stomper = (Casting unit)
    • Unit Group - Pick every unit in (Units within 512.00 of (Position of Stomper)) and do (Set Manadrained = (Last created unit group))
    • Unit Group - Pick every unit in Manadrained and do (Unit - Set mana of (Triggering unit) to 50.00%)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
This could be vastly improved as a trigger, too:

(Uses Point variable TempPoint)

  • Blah
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arthas + Dummy = Doom
    • Actions
      • Set TempPoint = (Position of (Triggering Unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick Every Unit in (Units within 512 of TempPoint) and do actions
        • Loop - Actions
          • Unit - Set Mana of (Picked Unit) to 50.00%
      • Custom script: call RemoveLocation(udg_TempPont)
 
Level 4
Joined
Jul 23, 2007
Messages
129
Try this:
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Arthas + Dummy = Doom
  • Actions
  • Set Stomper = (Casting unit)
  • Unit Group - remove all units from (manadrained) [[I don't remember the exact action for this]]
  • Unit Group - Pick every unit in (Units within 512.00 of (Position of Stomper)) and add (picked unit) to (manadrained).
  • Unit Group - Pick every unit in Manadrained and do (Unit - Set mana of (picked unit) to 50.00%)
EDIT: Nevermind, Purplepoot's is much better.
 
Status
Not open for further replies.
Top