AOE draining mana and giving it to the hero

nicolas

New Member
Reaction score
2
Hi,

i had the idea of making a spell which could drain all units mana in range and then giving the total mana drained to the hero.

So my first thought was to base it on starfall (No special reason) and then make a trigger with some real variable to set the total mana.

Event: Unit cast an ability
Condition: ability being cast equal to [spell]
Actions: pick every unit in range of [casting hero] and do actions:
Set [mana variable] = (Mana of(Picked unit))
Set mana of picked unit to 0
Set mana of [casting hero] to mana of [casting hero] +[mana variable]

The problem with this trigger is that he only sets the mana variable to 1 picked unit.

so my question is: how can i make it work?

Thx in advance
 

Grymlax

Probably not around
Reaction score
138
try setting the casters mana outside of the loop.

like this:
Code:
[B]AOE draining mana and giving it to the hero spell[/B]
    [B]Events[/B]
        Unit - A unit Starts the effect of an ability
    [B]Conditions[/B]
        (Ability being cast) Equal to [spell]
    [B]Actions[/B]
        Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit))) and do (Actions)
            Loop - Actions
                Set [mana variable] = ([mana variable] + (Mana of (Picked unit)))
                Unit - Set mana of (Picked unit) to 0.00
        Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + [mana variable])
 
1

131ackout

Guest
(steals this code)

heheh, well i need this

okay to borrow this?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top