Help, I need mana drain lightning effect but i fail

Level 2
Joined
Oct 29, 2023
Messages
7
I want to add mana drain spell effect when a unit use Life drain ability, could someone tell me how can i trigget it? i'm using 1.30world editor
Thank you very much

屏幕截图 2025-04-29 152622.png
屏幕截图 2025-04-29 152554.png
 
Level 12
Joined
Nov 13, 2010
Messages
277
here you go
start
  • ef start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Life Drain
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Target unit of ability being cast)) Not equal to (Owner of (Triggering unit))
        • Then - Actions
          • Custom script: set udg_ManaLightningArt = AddLightning("Abilities\\Spells\\Human\\SiphonMana\\SiphonManaTarget.mdl", true, GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), GetUnitX(GetSpellTargetUnit()), GetUnitY(GetSpellTargetUnit()))
          • Set VariableSet ManaLightningArt = (Last created lightning effect)
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Other\Drain\DrainCaster.mdl
          • Set VariableSet ManaCaster = (Last created special effect)
          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Other\Drain\DrainTarget.mdl
          • Set VariableSet ManaTarget = (Last created special effect)
        • Else - Actions
stop
  • ef stop
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Life Drain
    • Actions
      • Custom script: call DestroyLightning(udg_ManaLightningArt)
      • Special Effect - Destroy ManaCaster
      • Special Effect - Destroy ManaTarget
 
Level 2
Joined
Oct 29, 2023
Messages
7
here you go
start
  • ef start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Life Drain
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Target unit of ability being cast)) Not equal to (Owner of (Triggering unit))
        • Then - Actions
          • Custom script: set udg_ManaLightningArt = AddLightning("Abilities\\Spells\\Human\\SiphonMana\\SiphonManaTarget.mdl", true, GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), GetUnitX(GetSpellTargetUnit()), GetUnitY(GetSpellTargetUnit()))
          • Set VariableSet ManaLightningArt = (Last created lightning effect)
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Other\Drain\DrainCaster.mdl
          • Set VariableSet ManaCaster = (Last created special effect)
          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Other\Drain\DrainTarget.mdl
          • Set VariableSet ManaTarget = (Last created special effect)
        • Else - Actions
stop
  • ef stop
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Life Drain
    • Actions
      • Custom script: call DestroyLightning(udg_ManaLightningArt)
      • Special Effect - Destroy ManaCaster
      • Special Effect - Destroy ManaTarget

oh thank you so much
 
Level 2
Joined
Oct 29, 2023
Messages
7
here you go
start
  • ef start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Life Drain
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Target unit of ability being cast)) Not equal to (Owner of (Triggering unit))
        • Then - Actions
          • Custom script: set udg_ManaLightningArt = AddLightning("Abilities\\Spells\\Human\\SiphonMana\\SiphonManaTarget.mdl", true, GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), GetUnitX(GetSpellTargetUnit()), GetUnitY(GetSpellTargetUnit()))
          • Set VariableSet ManaLightningArt = (Last created lightning effect)
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Other\Drain\DrainCaster.mdl
          • Set VariableSet ManaCaster = (Last created special effect)
          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Other\Drain\DrainTarget.mdl
          • Set VariableSet ManaTarget = (Last created special effect)
        • Else - Actions
stop
  • ef stop
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Life Drain
    • Actions
      • Custom script: call DestroyLightning(udg_ManaLightningArt)
      • Special Effect - Destroy ManaCaster
      • Special Effect - Destroy ManaTarget
Hi polardude, the lightning effedt still dont work for me, there is no more error message but in the game the effect doent appear.
Could you help me please?

what i have copie to custom script set
udg_ManaLightningArt = AddLightning("Abilities\\Spells\\Human\\SiphonMana\\SiphonManaTarget.mdl", true, GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), GetUnitX(GetSpellTargetUnit()), GetUnitY(GetSpellTargetUnit()))

屏幕截图 2025-04-30 011826.png
屏幕截图 2025-04-30 012223.png
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Lightning uses special Strings for it's art:
  • Set Lightning_Art = DRAM
  • Custom script: set udg_Lightning = AddLightningEx( udg_Lightning_Art, true, udg_X[0], udg_Y[0], udg_Z[0], udg_X[1], udg_Y[1], udg_Z[1] )
In my example, X/Y/Z are Real arrays that would be set to your desired start/end coordinates.
"Chain Lightning Primary" - "CLPB"
"Chain Lightning Secondary" - "CLSB"
"Drain" - "DRAB"
"Drain Life" - "DRAL"
"Drain Mana" - "DRAM"
"Finger of Death" - "AFOD"
"Forked Lightning" - "FORK"
"Healing Wave Primary" - "HWPB"
"Healing Wave Secondary" - "HWSB"
"Lightning Attack" - "CHIM"
"Magic Leash" - "LEAS"
"Mana Burn" - "MBUR"
"Mana Flare" - "MFPB"
"Spirit Link" - "SPLK"
 
Last edited:
Top