troylowyee
Active Member
- Reaction score
- 0
:banghead:how can i create a paasive aoe lifedrain with a lightning effect.
Life Drain Aura Group
Events
Unit - A unit Learns a skill
Conditions
(Level of Life Drain Aura for (Triggering unit)) Equal to 1
Actions
Unit Group - Add (Triggering unit) to LifeDrainAuraGrp
Life Drain Aura
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in LifeDrainAuraGrp and do (Actions)
Loop - Actions
Set TempUnit = (Picked unit)
Set TempReal = (5.00 + (5.00 x (Real((Level of Life Drain Aura for TempUnit)))))
Set TempPoint = (Position of TempUnit)
Set TempGroup = (Units within 400.00 of TempPoint matching (((Owner of (Matching unit)) is an enemy of (Owner of TempUnit)) Equal to True))
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Unit - Cause TempUnit to damage (Picked unit), dealing TempReal damage of attack type Spells and damage type Normal
Set TempPoint2 = (Position of (Picked unit))
Unit - Create 1 Dummy for (Owner of TempUnit) at TempPoint facing TempPoint2
Set LastCreated = (Last created unit)
Unit - Add Life Drain Aura Effect to LastCreated
Unit - Add a 2.00 second Generic expiration timer to LastCreated
Unit - Order LastCreated to Orc Far Seer - Chain Lightning (Picked unit)
Set TempInteger = ((Number of units in TempGroup) x (Integer(TempReal)))
Unit - Set life of TempUnit to ((Life of TempUnit) + (Real(TempInteger)))
Custom script: call RemoveLocation( udg_TempPoint )
Custom script: call RemoveLocation( udg_TempPoint2 )
Custom script: call DestroyGroup( udg_TempGroup )