I could make the trigger but I use the latest version of Warcraft 3. You can't open my map if you are using an older version.and can u do this trigger like this do not know how to do this triger :/ (send map with full trigger ("full trigger" fully like this lighting please) please)
Cleanest solution? Definitely not. A working solution? Yes.Are you sure that is the cleanest solution? that's a lot of code for displaying some lightning. Admittedly path detection is annoying but since you are using a system for that..
I remember making a similar effect for a cinematic where I had a rotating lightning star for some summon effect. I do not have perfect memory but probably five times less code.
function CreatePentagram takes string lite, real centerX, real centerY, real facing, real radius returns nothing
local integer sides = 5
local real array x
local real array y
local location tempLoc
local integer i=0
local integer j=0
local real angle=facing*3.14159/180
loop
exitwhen (i==sides)
set x[i]=centerX+Cos(angle)*radius
set y[i]=centerY+Sin(angle)*radius
set angle=angle+(2*3.14159/sides)
set i=i+1
endloop
set i=0
loop
exitwhen (i==sides)
set j=ModuloInteger(i+2,sides)
set udg_Penta_P[i] = Location(x[i], y[i])
set tempLoc = Location(x[j], y[j])
set udg_Penta_Lite[i] = AddLightningEx(lite, true , GetLocationX(udg_Penta_P[i]), GetLocationY(udg_Penta_P[i]), GetLocationZ(udg_Penta_P[i]) + udg_Penta_Z, GetLocationX(tempLoc), GetLocationY(tempLoc), GetLocationZ(tempLoc) + udg_Penta_Z)
call RemoveLocation(tempLoc)
set udg_Penta_P[i+sides] = Location(x[i], y[i])
if i != 4 then
set tempLoc = Location(x[i+1], y[i+1])
else
set tempLoc = Location(x[0], y[0])
endif
set udg_Penta_Lite[i+sides] = AddLightningEx(lite, true , GetLocationX(udg_Penta_P[i]), GetLocationY(udg_Penta_P[i]), GetLocationZ(udg_Penta_P[i]) + udg_Penta_Z, GetLocationX(tempLoc), GetLocationY(tempLoc), GetLocationZ(tempLoc) + udg_Penta_Z)
call RemoveLocation(tempLoc)
set i=i+1
endloop
set tempLoc = null
endfunction
"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"