Cho em hỏi em mún làm spell dựa trên Chain lighting như sao : khi giật chain thi trên đầu unit bi target đầu tiên sẽ xuất hiện một dummy, trong phạm vi 500 AOE từ unit này sẽ tìm tất cả các target và lần lượt cast Chain lên.SKill mới từ Chain em đặt là Arc Lighting.Trigger như sao ( em mới tập dc 1 tuần ):
Conditions
(Ability being cast) Equal to Arc Lighting
Actions
Set Caster = (Triggering unit)
Set Target = (Target unit of ability being cast)
Set TargetPoint = (Position of Target)
Unit - Create 1 Zues Dummy for (Owner of Caster) at TargetPoint facing Default building facing degrees
Set UnitGroup = (Units within 500.00 of (TargetPoint) matching (((Matching unit) is A structure) Equal to False))
and (((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is dead) Equal to False) .
Unit Group - Pick all unit in UnitGroup and do (Actions)
Loop - Action
Add Chain Lighting to (Last Created unit)
Set level of Chain Lighting for (last created unit ) to (level of Arc Lighting ) for Caster
Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
Custom script: call DestroyGroup (udg_UnitGroup)
Custom script: call RemoveLocation(udg_TargetPoint)
Nhưng ko hỉu sai chỗ nào mà nó ko hoạt động , em đã tạo một flying unit tên là Zues Dummy có Chain , các biến Target,Carter ,TagerPoint mà vẫn ko dc . Cac anh xem trigger này có sai hok nhé
nè nhé , mai mốt post trigger thì cho vào thẻ code đoàng hoàng
bây giờ tạo 1 biến Unit tên gì cũng đc
set biến đó là Dummy vừa create
xong rồi add Chain Lightning cho dummy đó ở ngoài loop
rồi sửa mấy cái Last created unit thành biến dummy






