Đăng ký

Tham gia : 2011-12-06
Bài gửi : 4961
Point : 4909
Nhận thích : 5243
Biệt Danh : lForeverlAlonel
Tường Bài viết Kết bạn Chặn

[Tutorial] Tạo spell AoE


Sau đây mình xin hd làm một spell AoE, cụ thể là Thunder Clap của mountain king mà đc xếp thành hình tròn, đồng thời deal dmg trong 500 phạm vi. Từ đây có thể thay đổi effect cho đẹp hoặc đổi sang dạng khác (như target vào một mục tiêu rồi tạo effect xung quanh nó hoặc chọn một vùng,...).Ngoài ra còn có demo cuối bài cho ai chậm hiểu pig

Bấm vào đây xem toàn bộ nội dung:

Tạo một spell base từ Thunder Clap, chỉnh thông số như sau

Tạo một hero mới, add cho nó ability đó

Chờ gì nữa? Đăt ra map đi

Bật F4, del trigger cũ, tạo trigger mới

Tạo events như sau

Tạo Conditions như sau, (Ability Compasion)

Action chọn như hình

Nó sẽ ntn

Tạo một action nữa, ở trên là special efect, ớ dưới như hình, nhớ để nó ơ trong loop

Click vào chỗ xahn đầu tiên, chọn như hình

Nó sẽ ntn, à quên, nó tựa vậy thôi, chỉnh lại cho giống, (có thể thay một số thứ như thông số 500)

Tạo một action như trên ở dưới action tạo effect

Tạo thêm một action để gây dmg, thuộc unit group

Chọn như hình pig

THêm action, thuộc Unit, nhưu hình

Làm theo hình

Đây là kết quả pig

Demo: mediafire.com ?0ed1sk2ioa2tjbq

View user profile evil_hunter_never_die@yahoo.com
Tầng 1 on 5/8/2012, 18:44
Tham gia : 2011-10-21
Bài gửi : 620
Point : 1549
Nhận thích : 232
Biệt Danh : WoW..Gavin
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

hehe,em vote mở hàng ..

View user profile ve_p3kute@yahoo.com
Tầng 2 on 5/8/2012, 18:50
Tham gia : 2012-05-20
Bài gửi : 415
Point : 942
Nhận thích : 72
Biệt Danh : 19101994
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

ta nhớ có cái Tut hướng dẫn tạo hình tròn, hình vuông v.v... của mi viết rùi mà nhỉ??? sao không post típ cái đấy cho dmg vào mà tạo cái mới chi??? "rãnh việc chạy rong"

View user profile
Tầng 3 on 5/8/2012, 18:58
Tham gia : 2012-03-29
Bài gửi : 298
Point : 1341
Nhận thích : 654
Biệt Danh : satkhi3
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

hay qua'

View user profile
Tầng 4 on 5/8/2012, 19:01
Tham gia : 2012-01-26
Bài gửi : 1209
Point : 4100
Nhận thích : 760
Biệt Danh : K3_Posh
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

Vote, này, sao ảnh của mi lúc nào cũng nhỏ hết vậy EH

View user profile doilaket_chetlahet@yahoo.com
Tầng 5 on 7/8/2012, 19:03
Tham gia : 2011-12-06
Bài gửi : 4961
Point : 4909
Nhận thích : 5243
Biệt Danh : lForeverlAlonel
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

@K3_Posh wrote:Vote, này, sao ảnh của mi lúc nào cũng nhỏ hết vậy EH

Chứ sao mới to đc? :T

View user profile evil_hunter_never_die@yahoo.com
Tầng 6 on 7/8/2012, 20:01
Tham gia : 2012-01-26
Bài gửi : 1209
Point : 4100
Nhận thích : 760
Biệt Danh : K3_Posh
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

Không nên bỏ vào spolider


O^

View user profile doilaket_chetlahet@yahoo.com
Tầng 7 on 7/8/2012, 21:12
Tham gia : 2012-08-11
Bài gửi : 6
Point : 12
Nhận thích : 0
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

hay ghê

View user profile
Tầng 8 on 11/8/2012, 22:39
Tham gia : 2012-08-29
Bài gửi : 4
Point : 10
Nhận thích : 0
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

sao máy tui ko có cái data aoe nhĩ

View user profile
Tầng 9 on 30/8/2012, 15:29
Tham gia : 2012-07-23
Bài gửi : 47
Point : 94
Nhận thích : 0
Biệt Danh : 012345678
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

làm cái này sao dzậy
tui tìm mãi ko ra

View user profile
Tầng 10 on 31/8/2012, 20:27
Tham gia : 2011-07-09
Bài gửi : 7623
Point : 35724
Nhận thích : 1450
Biệt Danh : AVA.MariaVorel
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

Còn 1 loại skill tốt hơn mà ảo hơn này =]]
Trigger:

Events
- Map initialization
Conditions
----------
Actions
- Set Sweep_DataCount = 14
- Set zLoc = (Point(0.00, 0.00))
- Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to S|cffffcc00w|reeping Beam
Actions
- Set u = (Triggering unit)
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set i2 = 2
- For each (Integer i) from 1 to i2, do (Actions)
Loop - Actions
- Set r = 200.00
- Custom script: set udg_x = GetSpellTargetX()
- Custom script: set udg_y = GetSpellTargetY()-
- Set a = ((Atan2((y - y2), (x - x2))) + ((Real(((360 / i2) x i))) + 90.00))
- Set x = (x + (r x (Cos(a))))
- Set y = (y + (r x (Sin(a))))
- Set a = (a + 180.00)
- Set Sweep_Max = (Sweep_Max + 1)
- Lightning - Create a Finger of Death lightning effect from source zLoc to target zLoc
- Set Sweep_Lightning[Sweep_Max] = (Last created lightning effect)
- Custom script: if udg_Sweep_Group[udg_i] == null then
- Custom script: set udg_Sweep_Group[udg_i] = CreateGroup()
- Custom script: endif
- Set Sweep_Caster[Sweep_Max] = u
- Set Sweep_Data[(Sweep_Max x Sweep_DataCount)] = 0.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 1)] = (r x 2.00)
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] = 8.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 4)] = y
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 5)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Cos(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 6)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Sin(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 7)] = 70.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 8)] = (a - ((Atan2((y - y2), (x - x2))) + 90.00))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 9)] = 130.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 10)] = 150.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 11)] = 50.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 12)] = 0.00
Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 13)] = 3.00
Trigger - Turn on Sweep Loop <gen>
- [?] Sweep Loop
Events
- Time - Every 0.03 seconds of game time
Conditions
------------
Actions
- For each (Integer i) from 1 to Sweep_Max, do (Actions)
Loop - Actions
- Set u = Sweep_Caster[i]
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- u Not equal to No unit
- (Life of u) Greater than 0.00
- Sweep_Data[(i x Sweep_DataCount)] Less than Sweep_Data[((i x Sweep_DataCount) + 1)]
Then - Actions
- Set Sweep_Data[(i x Sweep_DataCount)] = (Sweep_Data[(i x Sweep_DataCount)] + Sweep_Data[((i x Sweep_DataCount) + 2)])
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set a = ((Facing of u) + (Sweep_Data[((i x Sweep_DataCount) + 8)] - 90.00))
- Set x2 = (x2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Cos(a))))
- Set y2 = (y2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Sin(a))))
- Custom script: call MoveLocation(udg_zLoc, udg_x2, udg_y2)
- Custom script: set udg_r2 = GetLocationZ(udg_zLoc)
- Set r2 = (r2 + Sweep_Data[((i x Sweep_DataCount) + 9)])
- Set x = (Sweep_Data[((i x Sweep_DataCount) + 3)] + Sweep_Data[((i x Sweep_DataCount) + 5)])
- Set y = (Sweep_Data[((i x Sweep_DataCount) + 4)] + Sweep_Data[((i x Sweep_DataCount) + 6)])
- Set Sweep_Data[((i x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((i x Sweep_DataCount) + 4)] = y
- Custom script: call MoveLocation(udg_zLoc, udg_x, udg_y)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- Sweep_Data[((i x Sweep_DataCount) + 12)] Greater than or equal to Sweep_Data[((i x Sweep_DataCount) + 13)]
Then - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = 0.00
- Special Effect - Create a special effect at zLoc using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Special Effect - Destroy (Last created special effect)
Else - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = (Sweep_Data[((i x Sweep_DataCount) + 12)] + 1.00)
- Set r = Sweep_Data[((i x Sweep_DataCount) + 10)]
- Custom script: call GroupEnumUnitsInRange(udg_g, udg_x, udg_y, udg_r, null)
- Unit Group - Pick every unit in g and do (Actions)
Loop - Actions
- Set u2 = (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- (Life of u2) Greater than 0.00
- (u2 is A structure) Equal to False
- (u2 is A flying unit) Equal to False
- (u2 is Mechanical) Equal to False
-(u2 is Magic Immune) Equal to False
- (u2 is in Sweep_Group[i]) Equal to False
(u2 belongs to an enemy of (Owner of u)) Equal to True
Then - Actions
- Unit Group - Add u2 to Sweep_Group[i]
- Unit - Cause u to damage u2, dealing Sweep_Data[((i x Sweep_DataCount) + 11)] damage of attack type Spells and damage type Unknown
Else - Actions
- Custom script: call MoveLightningEx(udg_Sweep_Lightning[udg_i], true, udg_x, udg_y, GetLocationZ(udg_zLoc), udg_x2, udg_y2, udg_r2)
Else - Actions
- Set Sweep_Caster[i] = Sweep_Caster[Sweep_Max]
- Lightning - Destroy Sweep_Lightning[i]
- Set Sweep_Lightning[i] = Sweep_Lightning[Sweep_Max]
- Unit Group - Remove all units from Sweep_Group[i]
- Unit Group - Add all units of Sweep_Group[Sweep_Max] to Sweep_Group[i]
- Unit Group - Remove all units from Sweep_Group[Sweep_Max]
- For each (Integer i2) from 0 to (Sweep_DataCount - 1), do (Actions)
Loop - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + i2)] = Sweep_Data[((Sweep_Max x Sweep_DataCount) + i2)]
- Set Sweep_Max = (Sweep_Max - 1)
- Set i = (i - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- Sweep_Max Less than 1
Then - Actions
- Trigger - Turn off (This trigger)
Else - Actions
Còn ko thì code winking
Code:
Events
- Map initialization
Conditions
----------
Actions
- Set Sweep_DataCount = 14
- Set zLoc = (Point(0.00, 0.00))
- Events
 Unit - A unit Starts the effect of an ability
 Conditions
 (Ability being cast) Equal to S|cffffcc00w|reeping Beam
 Actions
- Set u = (Triggering unit)
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set i2 = 2
- For each (Integer i) from 1 to i2, do (Actions)
 Loop - Actions
- Set r = 200.00
- Custom script: set udg_x = GetSpellTargetX()
- Custom script: set udg_y = GetSpellTargetY()-
- Set a = ((Atan2((y - y2), (x - x2))) + ((Real(((360 / i2) x i))) + 90.00))
- Set x = (x + (r x (Cos(a))))
- Set y = (y + (r x (Sin(a))))
- Set a = (a + 180.00)
- Set Sweep_Max = (Sweep_Max + 1)
- Lightning - Create a Finger of Death lightning effect from source zLoc to target zLoc
- Set Sweep_Lightning[Sweep_Max] = (Last created lightning effect)
- Custom script: if udg_Sweep_Group[udg_i] == null then
- Custom script: set udg_Sweep_Group[udg_i] = CreateGroup()
- Custom script: endif
- Set Sweep_Caster[Sweep_Max] = u
- Set Sweep_Data[(Sweep_Max x Sweep_DataCount)] = 0.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 1)] = (r x 2.00)
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] = 8.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 4)] = y
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 5)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Cos(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 6)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Sin(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 7)] = 70.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 8)] = (a - ((Atan2((y - y2), (x - x2))) + 90.00))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 9)] = 130.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 10)] = 150.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 11)] = 50.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 12)] = 0.00
 Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 13)] = 3.00
 Trigger - Turn on Sweep Loop <gen>
- [?] Sweep Loop
Events
- Time - Every 0.03 seconds of game time
Conditions
------------
Actions
- For each (Integer i) from 1 to Sweep_Max, do (Actions)
 Loop - Actions
- Set u = Sweep_Caster[i]
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- u Not equal to No unit
- (Life of u) Greater than 0.00
- Sweep_Data[(i x Sweep_DataCount)] Less than Sweep_Data[((i x Sweep_DataCount) + 1)]
 Then - Actions
- Set Sweep_Data[(i x Sweep_DataCount)] = (Sweep_Data[(i x Sweep_DataCount)] + Sweep_Data[((i x Sweep_DataCount) + 2)])
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set a = ((Facing of u) + (Sweep_Data[((i x Sweep_DataCount) + 8)] - 90.00))
- Set x2 = (x2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Cos(a))))
- Set y2 = (y2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Sin(a))))
- Custom script: call MoveLocation(udg_zLoc, udg_x2, udg_y2)
- Custom script: set udg_r2 = GetLocationZ(udg_zLoc)
- Set r2 = (r2 + Sweep_Data[((i x Sweep_DataCount) + 9)])
- Set x = (Sweep_Data[((i x Sweep_DataCount) + 3)] + Sweep_Data[((i x Sweep_DataCount) + 5)])
- Set y = (Sweep_Data[((i x Sweep_DataCount) + 4)] + Sweep_Data[((i x Sweep_DataCount) + 6)])
- Set Sweep_Data[((i x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((i x Sweep_DataCount) + 4)] = y
- Custom script: call MoveLocation(udg_zLoc, udg_x, udg_y)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- Sweep_Data[((i x Sweep_DataCount) + 12)] Greater than or equal to Sweep_Data[((i x Sweep_DataCount) + 13)]
 Then - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = 0.00
- Special Effect - Create a special effect at zLoc using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Special Effect - Destroy (Last created special effect)
 Else - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = (Sweep_Data[((i x Sweep_DataCount) + 12)] + 1.00)
- Set r = Sweep_Data[((i x Sweep_DataCount) + 10)]
- Custom script: call GroupEnumUnitsInRange(udg_g, udg_x, udg_y, udg_r, null)
- Unit Group - Pick every unit in g and do (Actions)
 Loop - Actions
- Set u2 = (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- (Life of u2) Greater than 0.00
- (u2 is A structure) Equal to False
- (u2 is A flying unit) Equal to False
- (u2 is Mechanical) Equal to False
 -(u2 is Magic Immune) Equal to False
- (u2 is in Sweep_Group[i]) Equal to False
 (u2 belongs to an enemy of (Owner of u)) Equal to True
 Then - Actions
- Unit Group - Add u2 to Sweep_Group[i]
- Unit - Cause u to damage u2, dealing Sweep_Data[((i x Sweep_DataCount) + 11)] damage of attack type Spells and damage type Unknown
 Else - Actions
- Custom script: call MoveLightningEx(udg_Sweep_Lightning[udg_i], true, udg_x, udg_y, GetLocationZ(udg_zLoc), udg_x2, udg_y2, udg_r2)
 Else - Actions
- Set Sweep_Caster[i] = Sweep_Caster[Sweep_Max]
- Lightning - Destroy Sweep_Lightning[i]
- Set Sweep_Lightning[i] = Sweep_Lightning[Sweep_Max]
- Unit Group - Remove all units from Sweep_Group[i]
- Unit Group - Add all units of Sweep_Group[Sweep_Max] to Sweep_Group[i]
- Unit Group - Remove all units from Sweep_Group[Sweep_Max]
- For each (Integer i2) from 0 to (Sweep_DataCount - 1), do (Actions)
 Loop - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + i2)] = Sweep_Data[((Sweep_Max x Sweep_DataCount) + i2)]
- Set Sweep_Max = (Sweep_Max - 1)
- Set i = (i - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- Sweep_Max Less than 1
 Then - Actions
- Trigger - Turn off (This trigger)
 Else - Actions

View user profile Eva_Maria_Vorel@yahoo.com
Tầng 11 on 31/8/2012, 20:49
Tham gia : 2012-05-20
Bài gửi : 415
Point : 942
Nhận thích : 72
Biệt Danh : 19101994
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

bắt ta làm cái đó ta tình nguyện drop project straight face nhìn đau đầu kinh _ _!

View user profile
Tầng 12 on 31/8/2012, 21:04
Tham gia : 2011-12-06
Bài gửi : 4961
Point : 4909
Nhận thích : 5243
Biệt Danh : lForeverlAlonel
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

AVA Bạch Điểu wrote:Còn 1 loại skill tốt hơn mà ảo hơn này =]]
Trigger:

Events
- Map initialization
Conditions
----------
Actions
- Set Sweep_DataCount = 14
- Set zLoc = (Point(0.00, 0.00))
- Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to S|cffffcc00w|reeping Beam
Actions
- Set u = (Triggering unit)
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set i2 = 2
- For each (Integer i) from 1 to i2, do (Actions)
Loop - Actions
- Set r = 200.00
- Custom script: set udg_x = GetSpellTargetX()
- Custom script: set udg_y = GetSpellTargetY()-
- Set a = ((Atan2((y - y2), (x - x2))) + ((Real(((360 / i2) x i))) + 90.00))
- Set x = (x + (r x (Cos(a))))
- Set y = (y + (r x (Sin(a))))
- Set a = (a + 180.00)
- Set Sweep_Max = (Sweep_Max + 1)
- Lightning - Create a Finger of Death lightning effect from source zLoc to target zLoc
- Set Sweep_Lightning[Sweep_Max] = (Last created lightning effect)
- Custom script: if udg_Sweep_Group[udg_i] == null then
- Custom script: set udg_Sweep_Group[udg_i] = CreateGroup()
- Custom script: endif
- Set Sweep_Caster[Sweep_Max] = u
- Set Sweep_Data[(Sweep_Max x Sweep_DataCount)] = 0.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 1)] = (r x 2.00)
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] = 8.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 4)] = y
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 5)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Cos(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 6)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Sin(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 7)] = 70.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 8)] = (a - ((Atan2((y - y2), (x - x2))) + 90.00))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 9)] = 130.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 10)] = 150.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 11)] = 50.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 12)] = 0.00
Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 13)] = 3.00
Trigger - Turn on Sweep Loop <gen>
- [?] Sweep Loop
Events
- Time - Every 0.03 seconds of game time
Conditions
------------
Actions
- For each (Integer i) from 1 to Sweep_Max, do (Actions)
Loop - Actions
- Set u = Sweep_Caster[i]
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- u Not equal to No unit
- (Life of u) Greater than 0.00
- Sweep_Data[(i x Sweep_DataCount)] Less than Sweep_Data[((i x Sweep_DataCount) + 1)]
Then - Actions
- Set Sweep_Data[(i x Sweep_DataCount)] = (Sweep_Data[(i x Sweep_DataCount)] + Sweep_Data[((i x Sweep_DataCount) + 2)])
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set a = ((Facing of u) + (Sweep_Data[((i x Sweep_DataCount) + 8)] - 90.00))
- Set x2 = (x2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Cos(a))))
- Set y2 = (y2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Sin(a))))
- Custom script: call MoveLocation(udg_zLoc, udg_x2, udg_y2)
- Custom script: set udg_r2 = GetLocationZ(udg_zLoc)
- Set r2 = (r2 + Sweep_Data[((i x Sweep_DataCount) + 9)])
- Set x = (Sweep_Data[((i x Sweep_DataCount) + 3)] + Sweep_Data[((i x Sweep_DataCount) + 5)])
- Set y = (Sweep_Data[((i x Sweep_DataCount) + 4)] + Sweep_Data[((i x Sweep_DataCount) + 6)])
- Set Sweep_Data[((i x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((i x Sweep_DataCount) + 4)] = y
- Custom script: call MoveLocation(udg_zLoc, udg_x, udg_y)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- Sweep_Data[((i x Sweep_DataCount) + 12)] Greater than or equal to Sweep_Data[((i x Sweep_DataCount) + 13)]
Then - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = 0.00
- Special Effect - Create a special effect at zLoc using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Special Effect - Destroy (Last created special effect)
Else - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = (Sweep_Data[((i x Sweep_DataCount) + 12)] + 1.00)
- Set r = Sweep_Data[((i x Sweep_DataCount) + 10)]
- Custom script: call GroupEnumUnitsInRange(udg_g, udg_x, udg_y, udg_r, null)
- Unit Group - Pick every unit in g and do (Actions)
Loop - Actions
- Set u2 = (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- (Life of u2) Greater than 0.00
- (u2 is A structure) Equal to False
- (u2 is A flying unit) Equal to False
- (u2 is Mechanical) Equal to False
-(u2 is Magic Immune) Equal to False
- (u2 is in Sweep_Group[i]) Equal to False
(u2 belongs to an enemy of (Owner of u)) Equal to True
Then - Actions
- Unit Group - Add u2 to Sweep_Group[i]
- Unit - Cause u to damage u2, dealing Sweep_Data[((i x Sweep_DataCount) + 11)] damage of attack type Spells and damage type Unknown
Else - Actions
- Custom script: call MoveLightningEx(udg_Sweep_Lightning[udg_i], true, udg_x, udg_y, GetLocationZ(udg_zLoc), udg_x2, udg_y2, udg_r2)
Else - Actions
- Set Sweep_Caster[i] = Sweep_Caster[Sweep_Max]
- Lightning - Destroy Sweep_Lightning[i]
- Set Sweep_Lightning[i] = Sweep_Lightning[Sweep_Max]
- Unit Group - Remove all units from Sweep_Group[i]
- Unit Group - Add all units of Sweep_Group[Sweep_Max] to Sweep_Group[i]
- Unit Group - Remove all units from Sweep_Group[Sweep_Max]
- For each (Integer i2) from 0 to (Sweep_DataCount - 1), do (Actions)
Loop - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + i2)] = Sweep_Data[((Sweep_Max x Sweep_DataCount) + i2)]
- Set Sweep_Max = (Sweep_Max - 1)
- Set i = (i - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- Sweep_Max Less than 1
Then - Actions
- Trigger - Turn off (This trigger)
Else - Actions
Còn ko thì code winking
Code:
Events
- Map initialization
Conditions
----------
Actions
- Set Sweep_DataCount = 14
- Set zLoc = (Point(0.00, 0.00))
- Events
 Unit - A unit Starts the effect of an ability
 Conditions
 (Ability being cast) Equal to S|cffffcc00w|reeping Beam
 Actions
- Set u = (Triggering unit)
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set i2 = 2
- For each (Integer i) from 1 to i2, do (Actions)
 Loop - Actions
- Set r = 200.00
- Custom script: set udg_x = GetSpellTargetX()
- Custom script: set udg_y = GetSpellTargetY()-
- Set a = ((Atan2((y - y2), (x - x2))) + ((Real(((360 / i2) x i))) + 90.00))
- Set x = (x + (r x (Cos(a))))
- Set y = (y + (r x (Sin(a))))
- Set a = (a + 180.00)
- Set Sweep_Max = (Sweep_Max + 1)
- Lightning - Create a Finger of Death lightning effect from source zLoc to target zLoc
- Set Sweep_Lightning[Sweep_Max] = (Last created lightning effect)
- Custom script: if udg_Sweep_Group[udg_i] == null then
- Custom script: set udg_Sweep_Group[udg_i] = CreateGroup()
- Custom script: endif
- Set Sweep_Caster[Sweep_Max] = u
- Set Sweep_Data[(Sweep_Max x Sweep_DataCount)] = 0.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 1)] = (r x 2.00)
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] = 8.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 4)] = y
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 5)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Cos(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 6)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Sin(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 7)] = 70.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 8)] = (a - ((Atan2((y - y2), (x - x2))) + 90.00))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 9)] = 130.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 10)] = 150.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 11)] = 50.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 12)] = 0.00
 Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 13)] = 3.00
 Trigger - Turn on Sweep Loop <gen>
- [?] Sweep Loop
Events
- Time - Every 0.03 seconds of game time
Conditions
------------
Actions
- For each (Integer i) from 1 to Sweep_Max, do (Actions)
 Loop - Actions
- Set u = Sweep_Caster[i]
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- u Not equal to No unit
- (Life of u) Greater than 0.00
- Sweep_Data[(i x Sweep_DataCount)] Less than Sweep_Data[((i x Sweep_DataCount) + 1)]
 Then - Actions
- Set Sweep_Data[(i x Sweep_DataCount)] = (Sweep_Data[(i x Sweep_DataCount)] + Sweep_Data[((i x Sweep_DataCount) + 2)])
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set a = ((Facing of u) + (Sweep_Data[((i x Sweep_DataCount) + 8)] - 90.00))
- Set x2 = (x2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Cos(a))))
- Set y2 = (y2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Sin(a))))
- Custom script: call MoveLocation(udg_zLoc, udg_x2, udg_y2)
- Custom script: set udg_r2 = GetLocationZ(udg_zLoc)
- Set r2 = (r2 + Sweep_Data[((i x Sweep_DataCount) + 9)])
- Set x = (Sweep_Data[((i x Sweep_DataCount) + 3)] + Sweep_Data[((i x Sweep_DataCount) + 5)])
- Set y = (Sweep_Data[((i x Sweep_DataCount) + 4)] + Sweep_Data[((i x Sweep_DataCount) + 6)])
- Set Sweep_Data[((i x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((i x Sweep_DataCount) + 4)] = y
- Custom script: call MoveLocation(udg_zLoc, udg_x, udg_y)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- Sweep_Data[((i x Sweep_DataCount) + 12)] Greater than or equal to Sweep_Data[((i x Sweep_DataCount) + 13)]
 Then - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = 0.00
- Special Effect - Create a special effect at zLoc using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Special Effect - Destroy (Last created special effect)
 Else - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = (Sweep_Data[((i x Sweep_DataCount) + 12)] + 1.00)
- Set r = Sweep_Data[((i x Sweep_DataCount) + 10)]
- Custom script: call GroupEnumUnitsInRange(udg_g, udg_x, udg_y, udg_r, null)
- Unit Group - Pick every unit in g and do (Actions)
 Loop - Actions
- Set u2 = (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- (Life of u2) Greater than 0.00
- (u2 is A structure) Equal to False
- (u2 is A flying unit) Equal to False
- (u2 is Mechanical) Equal to False
 -(u2 is Magic Immune) Equal to False
- (u2 is in Sweep_Group[i]) Equal to False
 (u2 belongs to an enemy of (Owner of u)) Equal to True
 Then - Actions
- Unit Group - Add u2 to Sweep_Group[i]
- Unit - Cause u to damage u2, dealing Sweep_Data[((i x Sweep_DataCount) + 11)] damage of attack type Spells and damage type Unknown
 Else - Actions
- Custom script: call MoveLightningEx(udg_Sweep_Lightning[udg_i], true, udg_x, udg_y, GetLocationZ(udg_zLoc), udg_x2, udg_y2, udg_r2)
 Else - Actions
- Set Sweep_Caster[i] = Sweep_Caster[Sweep_Max]
- Lightning - Destroy Sweep_Lightning[i]
- Set Sweep_Lightning[i] = Sweep_Lightning[Sweep_Max]
- Unit Group - Remove all units from Sweep_Group[i]
- Unit Group - Add all units of Sweep_Group[Sweep_Max] to Sweep_Group[i]
- Unit Group - Remove all units from Sweep_Group[Sweep_Max]
- For each (Integer i2) from 0 to (Sweep_DataCount - 1), do (Actions)
 Loop - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + i2)] = Sweep_Data[((Sweep_Max x Sweep_DataCount) + i2)]
- Set Sweep_Max = (Sweep_Max - 1)
- Set i = (i - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- Sweep_Max Less than 1
 Then - Actions
- Trigger - Turn off (This trigger)
 Else - Actions

Tốt hơn nhưng chắc newbie làm dc?

View user profile evil_hunter_never_die@yahoo.com
Tầng 13 on 31/8/2012, 22:31
Tham gia : 2011-07-09
Bài gửi : 7623
Point : 35724
Nhận thích : 1450
Biệt Danh : AVA.MariaVorel
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

@Thợ Săn Quỷ wrote:
AVA Bạch Điểu wrote:Còn 1 loại skill tốt hơn mà ảo hơn này =]]
Trigger:

Events
- Map initialization
Conditions
----------
Actions
- Set Sweep_DataCount = 14
- Set zLoc = (Point(0.00, 0.00))
- Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to S|cffffcc00w|reeping Beam
Actions
- Set u = (Triggering unit)
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set i2 = 2
- For each (Integer i) from 1 to i2, do (Actions)
Loop - Actions
- Set r = 200.00
- Custom script: set udg_x = GetSpellTargetX()
- Custom script: set udg_y = GetSpellTargetY()-
- Set a = ((Atan2((y - y2), (x - x2))) + ((Real(((360 / i2) x i))) + 90.00))
- Set x = (x + (r x (Cos(a))))
- Set y = (y + (r x (Sin(a))))
- Set a = (a + 180.00)
- Set Sweep_Max = (Sweep_Max + 1)
- Lightning - Create a Finger of Death lightning effect from source zLoc to target zLoc
- Set Sweep_Lightning[Sweep_Max] = (Last created lightning effect)
- Custom script: if udg_Sweep_Group[udg_i] == null then
- Custom script: set udg_Sweep_Group[udg_i] = CreateGroup()
- Custom script: endif
- Set Sweep_Caster[Sweep_Max] = u
- Set Sweep_Data[(Sweep_Max x Sweep_DataCount)] = 0.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 1)] = (r x 2.00)
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] = 8.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 4)] = y
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 5)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Cos(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 6)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Sin(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 7)] = 70.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 8)] = (a - ((Atan2((y - y2), (x - x2))) + 90.00))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 9)] = 130.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 10)] = 150.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 11)] = 50.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 12)] = 0.00
Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 13)] = 3.00
Trigger - Turn on Sweep Loop <gen>
- [?] Sweep Loop
Events
- Time - Every 0.03 seconds of game time
Conditions
------------
Actions
- For each (Integer i) from 1 to Sweep_Max, do (Actions)
Loop - Actions
- Set u = Sweep_Caster[i]
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- u Not equal to No unit
- (Life of u) Greater than 0.00
- Sweep_Data[(i x Sweep_DataCount)] Less than Sweep_Data[((i x Sweep_DataCount) + 1)]
Then - Actions
- Set Sweep_Data[(i x Sweep_DataCount)] = (Sweep_Data[(i x Sweep_DataCount)] + Sweep_Data[((i x Sweep_DataCount) + 2)])
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set a = ((Facing of u) + (Sweep_Data[((i x Sweep_DataCount) + 8)] - 90.00))
- Set x2 = (x2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Cos(a))))
- Set y2 = (y2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Sin(a))))
- Custom script: call MoveLocation(udg_zLoc, udg_x2, udg_y2)
- Custom script: set udg_r2 = GetLocationZ(udg_zLoc)
- Set r2 = (r2 + Sweep_Data[((i x Sweep_DataCount) + 9)])
- Set x = (Sweep_Data[((i x Sweep_DataCount) + 3)] + Sweep_Data[((i x Sweep_DataCount) + 5)])
- Set y = (Sweep_Data[((i x Sweep_DataCount) + 4)] + Sweep_Data[((i x Sweep_DataCount) + 6)])
- Set Sweep_Data[((i x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((i x Sweep_DataCount) + 4)] = y
- Custom script: call MoveLocation(udg_zLoc, udg_x, udg_y)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- Sweep_Data[((i x Sweep_DataCount) + 12)] Greater than or equal to Sweep_Data[((i x Sweep_DataCount) + 13)]
Then - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = 0.00
- Special Effect - Create a special effect at zLoc using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Special Effect - Destroy (Last created special effect)
Else - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = (Sweep_Data[((i x Sweep_DataCount) + 12)] + 1.00)
- Set r = Sweep_Data[((i x Sweep_DataCount) + 10)]
- Custom script: call GroupEnumUnitsInRange(udg_g, udg_x, udg_y, udg_r, null)
- Unit Group - Pick every unit in g and do (Actions)
Loop - Actions
- Set u2 = (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- (Life of u2) Greater than 0.00
- (u2 is A structure) Equal to False
- (u2 is A flying unit) Equal to False
- (u2 is Mechanical) Equal to False
-(u2 is Magic Immune) Equal to False
- (u2 is in Sweep_Group[i]) Equal to False
(u2 belongs to an enemy of (Owner of u)) Equal to True
Then - Actions
- Unit Group - Add u2 to Sweep_Group[i]
- Unit - Cause u to damage u2, dealing Sweep_Data[((i x Sweep_DataCount) + 11)] damage of attack type Spells and damage type Unknown
Else - Actions
- Custom script: call MoveLightningEx(udg_Sweep_Lightning[udg_i], true, udg_x, udg_y, GetLocationZ(udg_zLoc), udg_x2, udg_y2, udg_r2)
Else - Actions
- Set Sweep_Caster[i] = Sweep_Caster[Sweep_Max]
- Lightning - Destroy Sweep_Lightning[i]
- Set Sweep_Lightning[i] = Sweep_Lightning[Sweep_Max]
- Unit Group - Remove all units from Sweep_Group[i]
- Unit Group - Add all units of Sweep_Group[Sweep_Max] to Sweep_Group[i]
- Unit Group - Remove all units from Sweep_Group[Sweep_Max]
- For each (Integer i2) from 0 to (Sweep_DataCount - 1), do (Actions)
Loop - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + i2)] = Sweep_Data[((Sweep_Max x Sweep_DataCount) + i2)]
- Set Sweep_Max = (Sweep_Max - 1)
- Set i = (i - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
- Sweep_Max Less than 1
Then - Actions
- Trigger - Turn off (This trigger)
Else - Actions
Còn ko thì code winking
Code:
Events
- Map initialization
Conditions
----------
Actions
- Set Sweep_DataCount = 14
- Set zLoc = (Point(0.00, 0.00))
- Events
 Unit - A unit Starts the effect of an ability
 Conditions
 (Ability being cast) Equal to S|cffffcc00w|reeping Beam
 Actions
- Set u = (Triggering unit)
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set i2 = 2
- For each (Integer i) from 1 to i2, do (Actions)
 Loop - Actions
- Set r = 200.00
- Custom script: set udg_x = GetSpellTargetX()
- Custom script: set udg_y = GetSpellTargetY()-
- Set a = ((Atan2((y - y2), (x - x2))) + ((Real(((360 / i2) x i))) + 90.00))
- Set x = (x + (r x (Cos(a))))
- Set y = (y + (r x (Sin(a))))
- Set a = (a + 180.00)
- Set Sweep_Max = (Sweep_Max + 1)
- Lightning - Create a Finger of Death lightning effect from source zLoc to target zLoc
- Set Sweep_Lightning[Sweep_Max] = (Last created lightning effect)
- Custom script: if udg_Sweep_Group[udg_i] == null then
- Custom script: set udg_Sweep_Group[udg_i] = CreateGroup()
- Custom script: endif
- Set Sweep_Caster[Sweep_Max] = u
- Set Sweep_Data[(Sweep_Max x Sweep_DataCount)] = 0.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 1)] = (r x 2.00)
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] = 8.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 4)] = y
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 5)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Cos(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 6)] = (Sweep_Data[((Sweep_Max x Sweep_DataCount) + 2)] x (Sin(a)))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 7)] = 70.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 8)] = (a - ((Atan2((y - y2), (x - x2))) + 90.00))
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 9)] = 130.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 10)] = 150.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 11)] = 50.00
- Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 12)] = 0.00
 Set Sweep_Data[((Sweep_Max x Sweep_DataCount) + 13)] = 3.00
 Trigger - Turn on Sweep Loop <gen>
- [?] Sweep Loop
Events
- Time - Every 0.03 seconds of game time
Conditions
------------
Actions
- For each (Integer i) from 1 to Sweep_Max, do (Actions)
 Loop - Actions
- Set u = Sweep_Caster[i]
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- u Not equal to No unit
- (Life of u) Greater than 0.00
- Sweep_Data[(i x Sweep_DataCount)] Less than Sweep_Data[((i x Sweep_DataCount) + 1)]
 Then - Actions
- Set Sweep_Data[(i x Sweep_DataCount)] = (Sweep_Data[(i x Sweep_DataCount)] + Sweep_Data[((i x Sweep_DataCount) + 2)])
- Custom script: set udg_x2 = GetUnitX(udg_u)
- Custom script: set udg_y2 = GetUnitY(udg_u)
- Set a = ((Facing of u) + (Sweep_Data[((i x Sweep_DataCount) + 8)] - 90.00))
- Set x2 = (x2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Cos(a))))
- Set y2 = (y2 + (Sweep_Data[((i x Sweep_DataCount) + 7)] x (Sin(a))))
- Custom script: call MoveLocation(udg_zLoc, udg_x2, udg_y2)
- Custom script: set udg_r2 = GetLocationZ(udg_zLoc)
- Set r2 = (r2 + Sweep_Data[((i x Sweep_DataCount) + 9)])
- Set x = (Sweep_Data[((i x Sweep_DataCount) + 3)] + Sweep_Data[((i x Sweep_DataCount) + 5)])
- Set y = (Sweep_Data[((i x Sweep_DataCount) + 4)] + Sweep_Data[((i x Sweep_DataCount) + 6)])
- Set Sweep_Data[((i x Sweep_DataCount) + 3)] = x
- Set Sweep_Data[((i x Sweep_DataCount) + 4)] = y
- Custom script: call MoveLocation(udg_zLoc, udg_x, udg_y)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- Sweep_Data[((i x Sweep_DataCount) + 12)] Greater than or equal to Sweep_Data[((i x Sweep_DataCount) + 13)]
 Then - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = 0.00
- Special Effect - Create a special effect at zLoc using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Special Effect - Destroy (Last created special effect)
 Else - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + 12)] = (Sweep_Data[((i x Sweep_DataCount) + 12)] + 1.00)
- Set r = Sweep_Data[((i x Sweep_DataCount) + 10)]
- Custom script: call GroupEnumUnitsInRange(udg_g, udg_x, udg_y, udg_r, null)
- Unit Group - Pick every unit in g and do (Actions)
 Loop - Actions
- Set u2 = (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- (Life of u2) Greater than 0.00
- (u2 is A structure) Equal to False
- (u2 is A flying unit) Equal to False
- (u2 is Mechanical) Equal to False
 -(u2 is Magic Immune) Equal to False
- (u2 is in Sweep_Group[i]) Equal to False
 (u2 belongs to an enemy of (Owner of u)) Equal to True
 Then - Actions
- Unit Group - Add u2 to Sweep_Group[i]
- Unit - Cause u to damage u2, dealing Sweep_Data[((i x Sweep_DataCount) + 11)] damage of attack type Spells and damage type Unknown
 Else - Actions
- Custom script: call MoveLightningEx(udg_Sweep_Lightning[udg_i], true, udg_x, udg_y, GetLocationZ(udg_zLoc), udg_x2, udg_y2, udg_r2)
 Else - Actions
- Set Sweep_Caster[i] = Sweep_Caster[Sweep_Max]
- Lightning - Destroy Sweep_Lightning[i]
- Set Sweep_Lightning[i] = Sweep_Lightning[Sweep_Max]
- Unit Group - Remove all units from Sweep_Group[i]
- Unit Group - Add all units of Sweep_Group[Sweep_Max] to Sweep_Group[i]
- Unit Group - Remove all units from Sweep_Group[Sweep_Max]
- For each (Integer i2) from 0 to (Sweep_DataCount - 1), do (Actions)
 Loop - Actions
- Set Sweep_Data[((i x Sweep_DataCount) + i2)] = Sweep_Data[((Sweep_Max x Sweep_DataCount) + i2)]
- Set Sweep_Max = (Sweep_Max - 1)
- Set i = (i - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 If - Conditions
- Sweep_Max Less than 1
 Then - Actions
- Trigger - Turn off (This trigger)
 Else - Actions

Tốt hơn nhưng chắc newbie làm dc?
Tập tành mỗi ngày trình sẽ lên thôi :T như tui tự học WE hơn cả 2 năm mới hiểu dc sơ sơ, năm nay cũng có vẻ kha khá 1 chút =]]

View user profile Eva_Maria_Vorel@yahoo.com
Tầng 14 on 31/8/2012, 22:52
Tham gia : 2012-07-30
Bài gửi : 592
Point : 8828
Nhận thích : 192
Biệt Danh : Bin.sama
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

cái chương trình đang hướng dẫn đó của vn hay nước khác tạo ra thế

View user profile
Tầng 15 on 31/8/2012, 22:54
Tham gia : 2011-07-09
Bài gửi : 7623
Point : 35724
Nhận thích : 1450
Biệt Danh : AVA.MariaVorel
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

@Bjn.Sama wrote:cái chương trình đang hướng dẫn đó của vn hay nước khác tạo ra thế
Trời ạ pig Nhìn cái bảng English nhiều thế mà ko biết nước mình hay nước ng` ta =]]

View user profile Eva_Maria_Vorel@yahoo.com
Tầng 16 on 31/8/2012, 22:56
Tham gia : 2012-06-12
Bài gửi : 24
Point : 49
Nhận thích : 0
Biệt Danh : 1ST.SoiBac
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

Nhét Code Ở Đâu . Và Cái Data Mình Không Thấy =.=

View user profile
Tầng 17 on 4/9/2012, 15:57
Tham gia : 2012-06-18
Bài gửi : 26
Point : 77
Nhận thích : 0
Biệt Danh : king.lucky
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

cho e hoi e tao dc skil roi nhung lai ko thay doi dc dame la sao ai chi e voi.
chi e cai skill barrage e muon lam cho no ban ten lua vao nhieu muc tieu thi lam the nao?



Last edited by King.Lucky on 5/2/2013, 01:21; edited 1 time in total (Reason for editing : http://www.phutu.org)

View user profile
Tầng 18 on 5/2/2013, 01:18
Tham gia : 2013-04-04
Bài gửi : 10
Point : 48
Nhận thích : 0
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

vậy sao để xác định hình cua skill vậy, nếu mình muốn nó là hình vuông, hoặc là hình khác thì sao !
.
P/S: Cho mình hỏi thêm, nếu skill của Zupapa giống với của thớt, thì tạo sao skill của ông ý nhiều biến đến vậy mà lại tốt hơn ? - tốt ở điểm nào ? - mình newbie nên nghĩ đơn thuần là càng ít biến, máy chạy càng nhẹ càng đỡ rối chứ nhỉ ?

View user profile
Tầng 19 on 15/8/2013, 05:05
Tham gia : 2012-05-19
Bài gửi : 1959
Point : 4820
Nhận thích : 216
Tường Bài viết Kết bạn Chặn

Re: [Tutorial] Tạo spell AoE

@zxforeverlovexz wrote:vậy sao để xác định hình cua skill vậy, nếu mình muốn nó là hình vuông, hoặc là hình khác thì sao !
.
P/S: Cho mình hỏi thêm, nếu skill của Zupapa giống với của thớt, thì tạo sao skill của ông ý nhiều biến đến vậy mà lại tốt hơn ? - tốt ở điểm nào ? - mình newbie nên nghĩ đơn thuần là càng ít biến, máy chạy càng nhẹ càng đỡ rối chứ nhỉ ?
 
học toán học xác định = độ-.- 

btw: cái đó xem mù rồi tốt nhất đừng nhìn -.-

View user profile
Tầng 20 on 15/8/2013, 13:07

Re: [Tutorial] Tạo spell AoE

Tầng 21 Today at 21:28


Tên truy cập