• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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