vậy thì trong cái này remove leak là làm cái gì? bạn giả sử cho mình với:
Events
Unit - A unit Is attacked
Sự kiện: tiếp tục bị đánh T_T
Conditions
((Triggering unit) has buff Counter Helix ) Equal to True
(Random integer number between 1 and 100) Less than or equal to 17
Điều kiện: thằng bị đánh có buff Counter Helix, và khả năng xảy ra Trigger là 17 %.
Set TriggerLoc = (Position of (Triggering unit))
Tạo 1 biến tên là TriggerLoc, Type: Point. Dòng nãy nghĩa là bạn đặt vị trí của thằng bị đánh thành TriggerLoc.
Set GroupCH = (Units within 250.00 of TriggerLoc matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is alive) Equal to True)))) ( dài vãi lúa T_T )
Tạo 1 biến tên GroupCH, type: Unit Group.
Dòng nãy nghĩa là bạn tạo 1 group, gồm các unit, với các điều kiện sau:
Các unit trong 250 AOE xung quanh thằng bị đánh
Các unit là kẻ thù của thằng bị đánh
Các unit ko phải là công trình
Các unit phải còn sống ( bạn ko muốn thấy cảnh lúc bạn múa cột mấy cái xác cũng tóe cả máu ra đâu T_T )
Custom script: call RemoveLocation(udg_TriggerLoc)
Remove Leak
---------- Post added at 15:31 ---------- Previous post was at 15:28 ----------
sẵn xem qua dùm cái trigger Counter Helix này của mình xem nó sai ở chỗ nào mà lại bị 2 lỗi (1 là ko có effect xịt màu và 2 là ko gậy damage):
Mã:
grom 3
Events
Unit - A unit Is attacked
Conditions
((Triggering unit) has buff ) Equal to True
(Random integer number between 1 and 100) Less than or equal to 17
Actions
Set TriggerLoc = (Position of (Triggering unit))
Set GroupCH = (Units within 300.00 of TriggerLoc matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is alive) Equal to True))))
Custom script: call RemoveLocation(udg_TriggerLoc)
Unit Group - Pick every unit in GroupCH and do (Actions)
Loop - Actions
Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Level of grom 3 for (Triggering unit)))) x 500.00) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Special Effect - Destroy (Last created special effect)
Animation - Play (Triggering unit)'s spin animation
Custom script: call DestroyGroup(udg_GroupCH)
Trigger - Turn off (This trigger)
Wait 0.60 game-time seconds
Trigger - Turn on (This trigger)
If (((Triggering unit) is alive) Equal to True) then do (Animation - Reset (Triggering unit)'s animation) else do (Do nothing)
sửa dùm luôn nha
