). Uhm. Cau nhac to moi thay ==. Ma` to` nghi` la` speed thi` chac ko can` fai wa chinh xac. Nen co the se dat dai thoi
. Gio` mun` giai thik ki~ cang` xem ra hoi kho.
.
Truoc to xai` cai trigger the nay` de tinh xem unit nao` dang tren cai tia set do
.
Lightning Strike
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Lightning Strike
Actions
Set tempPoint = (Position of (Triggering unit))
Set tempPoint2 = (Target point of ability being cast)
Set TempReal = (0.80 x (Real((Agility of (Triggering unit) (Include bonuses)))))
Custom script: set udg_LightningStrike_DamagedGroup=CreateGroup()
For each (Integer LightningStrike_Integer) from 1 to 7, do (Actions)
Loop - Actions
Set tempPoint3 = (tempPoint offset by 100.00 towards (Angle from tempPoint to tempPoint2) degrees)
Set tempGroup = (Units within 200.00 of tempPoint3 matching ((((Matching unit) is in LightningStrike_DamagedGroup) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) is Magic Immune) Equal to Fals
Unit Group - Pick every unit in tempGroup and do (Actions)
Loop - Actions
Set DamageType = 1
Unit - Cause (Triggering unit) to damage (Picked unit), dealing TempReal damage of attack type Spells and damage type Magic
Set DamageType = 0
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Add (Picked unit) to LightningStrike_DamagedGroup
Custom script: call RemoveLocation(udg_tempPoint3)
Custom script: call DestroyGroup(udg_tempGroup)
Custom script: call DestroyGroup(udg_LightningStrike_DamagedGroup)
Lightning - Create a Forked Lightning lightning effect from source tempPoint to target tempPoint2
Lightning - Change color of (Last created lightning effect) to (0.50 0.50 1.00) with 1.00 alpha
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
Set CV = (Custom value of (Last created unit))
Set LightningSystem_BasePoint[CV] = (Position of (Triggering unit))
Set LightningSystem_TargetPoint[CV] = (Target point of ability being cast)
Set LightningSystem_Duration[CV] = 0.40
Set LightningSystem_Effect[CV] = (Last created lightning effect)
Set LightningSystem_PointBoolean[CV] = True
Unit Group - Add (Last created unit) to LightningSystem_Group
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Lightning System Loop <gen> is on) Equal to False
Then - Actions
Trigger - Turn on Lightning System Loop <gen>
Else - Actions
Custom script: call RemoveLocation(udg_tempPoint)
Custom script: call RemoveLocation(udg_tempPoint2)
Do cai tia set o day lun dung im nen to chi viec xai` loop tu` vi tri cua caster den target point la` xong. Con` trong truong` hop cua cai skill to noi cho cau thi` do 2 element lun dc lien ket voi nhau va` tia set nam` giua chung nen chi viec lay angle tu` point cua element nay` den element kia roi` thay vao` cai angle o tempPoint3 la` dc. Con` truong` hop nao` khac thi` to ko bik
).