Khôn thế, đưa map là lộ cả thiên cơ rồi còn gì Cảm phiền xem luôn giùm được không, xem suốt 24 tiếng thế nào cũng hiểu :(
Thế thôi, kô muốn lộ thiên cơ mà muốn người ta giúp thì tốt nhất là vào Private Messenger hoặc lên Yahoo PM .
Mã: Actions For each (Integer A) from 1 to MUI[3], do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (BurnOrbCheck[(Integer A)] Equal to False) and (BurnOrbCheckAttack[(Integer A)] Equal to False) Then - Actions Set BurnOrbInteger[(Integer A)] = 1 Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbInteger[(Integer A)] Greater than 0 Then - Actions Set BurnOrbPointCaster[(Integer A)] = (Position of BurnOrbCaster[(Integer A)]) Set BurnOrbPointDummy[(Integer A)] = (Position of BurnOrbDummy[(Integer A)]) Custom script: set bj_wantDestroyGroup = true Unit Group - Pick every unit in [b](Units within 100.00 of BurnOrbPointDummy[(Integer A)][/b] matching ((((Matching unit) belongs to an enemy of (Owner of BurnOrbCaster[(Integer A)])) Equal to True) and (((((Matching unit) is alive) Equal to True) and ((Level of Spell Immunity (Neutral Hostile) fo and do (Actions) Loop - Actions Unit - Cause BurnOrbCaster[(Integer A)] to damage (Picked unit), dealing (((Real((Level of Burning Orb for BurnOrbCaster[(Integer A)]))) x 25.00) + 25.00) damage of attack type Spells and damage type Normal Unit - Order BurnOrbDummy[(Integer A)] to Night Elf Druid Of The Talon - Faerie Fire (Picked unit) Unit - Order BurnOrbDummy[(Integer A)] to Undead Necromancer - Cripple (Picked unit) Unit Group - Add (Picked unit) to BurnOrbGroup[(Integer A)] Special Effect - Create a special effect attached to the head of (Picked unit) using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl Special Effect - Destroy (Last created special effect) Special Effect - Create a special effect attached to the hand left of (Picked unit) using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl Special Effect - Destroy (Last created special effect) Special Effect - Create a special effect attached to the hand right of (Picked unit) using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl Special Effect - Destroy (Last created special effect) Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl Special Effect - Destroy (Last created special effect) Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl Special Effect - Destroy (Last created special effect) Special Effect - Create a special effect attached to the foot right of (Picked unit) using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl Special Effect - Destroy (Last created special effect) Special Effect - Create a special effect attached to the foot left of (Picked unit) using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl Special Effect - Destroy (Last created special effect) Custom script: set bj_wantDestroyGroup = true Unit Group - Pick every unit in [b](Units in (Playable map area)[/b] matching ((((Matching unit) belongs to an enemy of (Owner of BurnOrbCaster[(Integer A)])) Equal to True) and ((((Matching unit) has buff Burn) Equal to True) and (((Matching unit) is in BurnOrbGroup[(Integer A)]) Equal to True))) and do (Actions) Loop - Actions Unit - Cause BurnOrbCaster[(Integer A)] to damage (Picked unit), dealing 0.60 damage of attack type Spells and damage type Normal If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbInteger[(Integer A)] Greater than 5 Then - Actions Set BurnOrbPoint[(Integer A)] = (BurnOrbPointCaster[(Integer A)] offset by 140.00 towards ((Angle from BurnOrbPointCaster[(Integer A)] to BurnOrbPointDummy[(Integer A)]) - 5.00) degrees) Unit - Move BurnOrbDummy[(Integer A)] instantly to BurnOrbPoint[(Integer A)], facing ((Angle from BurnOrbPointCaster[(Integer A)] to BurnOrbPointDummy[(Integer A)]) - 90.00) degrees Custom script: call RemoveLocation(udg_BurnOrbPoint[bj_forLoopAIndex]) Set BurnOrbInteger[(Integer A)] = (BurnOrbInteger[(Integer A)] - 1) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbInteger[(Integer A)] Greater than 4 Then - Actions Set BurnOrbTarget[(Integer A)] = (Random unit from [b](Units within 800.00 of BurnOrbPointCaster[(Integer A)][/b] matching ((((Matching unit) belongs to an enemy of (Owner of BurnOrbCaster[(Integer A)])) Equal to True) and (((Matching unit) is alive) Equal to True)))) Set BurnOrbPointTarget[(Integer A)] = (Position of BurnOrbTarget[(Integer A)]) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbTarget[(Integer A)] Equal to No unit Then - Actions Set BurnOrbPoint[(Integer A)] = (BurnOrbPointCaster[(Integer A)] offset by 140.00 towards ((Angle from BurnOrbPointCaster[(Integer A)] to BurnOrbPointDummy[(Integer A)]) - 5.00) degrees) Unit - Move BurnOrbDummy[(Integer A)] instantly to BurnOrbPoint[(Integer A)], facing ((Angle from BurnOrbPointCaster[(Integer A)] to BurnOrbPointDummy[(Integer A)]) - 90.00) degrees Custom script: call RemoveLocation(udg_BurnOrbPoint[bj_forLoopAIndex]) Set BurnOrbInteger[(Integer A)] = 5 Else - Actions Set BurnOrbInteger[(Integer A)] = 4 Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbInteger[(Integer A)] Greater than 3 Then - Actions Set BurnOrbPoint[(Integer A)] = (BurnOrbPointCaster[(Integer A)] offset by 140.00 towards ((Angle from BurnOrbPointCaster[(Integer A)] to BurnOrbPointDummy[(Integer A)]) - 5.00) degrees) Unit - Move BurnOrbDummy[(Integer A)] instantly to BurnOrbPoint[(Integer A)], facing ((Angle from BurnOrbPointCaster[(Integer A)] to BurnOrbPointDummy[(Integer A)]) - 90.00) degrees Custom script: call RemoveLocation(udg_BurnOrbPoint[bj_forLoopAIndex]) Set BurnOrbUnit[(Integer A)] = (Random unit from [b](Units within (Distance between BurnOrbPointCaster[(Integer A)][/b] and BurnOrbPointTarget[(Integer A)]) of BurnOrbPointCaster[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of BurnOrbCaster[(Integer A)])) Equal to True) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbUnit[(Integer A)] Equal to No unit Then - Actions Set BurnOrbInteger[(Integer A)] = (BurnOrbInteger[(Integer A)] - 1) Set BurnOrbCheckAttack[(Integer A)] = True Else - Actions Set BurnOrbPointTarget2[(Integer A)] = (Position of BurnOrbUnit[(Integer A)]) Set BurnOrbPointTarget[(Integer A)] = (Position of BurnOrbTarget[(Integer A)]) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Integer((Distance between BurnOrbPointCaster[(Integer A)] and BurnOrbPointTarget[(Integer A)]))) Greater than (Integer((Distance between BurnOrbPointCaster[(Integer A)] and BurnOrbPointTarget2[(Integer A)]))) Then - Actions Set BurnOrbTarget[(Integer A)] = BurnOrbUnit[(Integer A)] Else - Actions Set BurnOrbInteger[(Integer A)] = (BurnOrbInteger[(Integer A)] - 1) Set BurnOrbCheckAttack[(Integer A)] = True Custom script: call RemoveLocation(udg_BurnOrbPointTarget2[bj_forLoopAIndex]) Custom script: call RemoveLocation(udg_BurnOrbPointTarget[bj_forLoopAIndex]) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbInteger[(Integer A)] Greater than 2 Then - Actions Set BurnOrbPointTarget[(Integer A)] = (Position of BurnOrbTarget[(Integer A)]) Set BurnOrbPoint[(Integer A)] = (BurnOrbPointDummy[(Integer A)] offset by 10.00 towards (Angle from BurnOrbPointDummy[(Integer A)] to BurnOrbPointTarget[(Integer A)]) degrees) Unit - Move BurnOrbDummy[(Integer A)] instantly to BurnOrbPoint[(Integer A)], facing (Angle from BurnOrbPointDummy[(Integer A)] to BurnOrbPointTarget[(Integer A)]) degrees Special Effect - Create a special effect at BurnOrbPointDummy[(Integer A)] using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl Special Effect - Destroy (Last created special effect) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Integer((Distance between BurnOrbPointDummy[(Integer A)] and BurnOrbPointTarget[(Integer A)]))) Less than or equal to 11 Then - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Unit-type of BurnOrbCaster[(Integer A)]) Equal to Lava Spirit Then - Actions Unit - Cause BurnOrbCaster[(Integer A)] to damage BurnOrbTarget[(Integer A)], dealing ((Real((Level of Burning Orb for BurnOrbCaster[(Integer A)]))) x 100.00) damage of attack type Spells and damage type Normal Else - Actions Unit - Cause BurnOrbCaster[(Integer A)] to damage BurnOrbTarget[(Integer A)], dealing ((Real((Level of Burning Orb for BurnOrbCaster[(Integer A)]))) x 100.00) damage of attack type Spells and damage type Normal Special Effect - Create a special effect at BurnOrbPointTarget[(Integer A)] using Abilities\Spells\Other\Doom\DoomDeath.mdl Special Effect - Destroy (Last created special effect) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Integer((Percentage life of BurnOrbCaster[(Integer A)]))) Greater than (Integer((Percentage life of BurnOrbTarget[(Integer A)]))) Then - Actions Unit - Cause BurnOrbCaster[(Integer A)] to damage BurnOrbTarget[(Integer A)], dealing (((Percentage life of BurnOrbCaster[(Integer A)]) - (Percentage life of BurnOrbTarget[(Integer A)])) x ((((Real((Level of Burning Orb for BurnOrbCaster[(Integer A)]))) x 2.00) / 4.00) + 0.50)) damage of attack type Spells and damage type Normal Else - Actions Set BurnOrbInteger[(Integer A)] = (BurnOrbInteger[(Integer A)] - 1) Else - Actions Custom script: call RemoveLocation(udg_BurnOrbPointTarget[bj_forLoopAIndex]) Custom script: call RemoveLocation(udg_BurnOrbPoint[bj_forLoopAIndex]) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbInteger[(Integer A)] Greater than 1 Then - Actions Set BurnOrbPoint[(Integer A)] = (BurnOrbPointDummy[(Integer A)] offset by 10.00 towards (Angle from BurnOrbPointDummy[(Integer A)] to BurnOrbPointCaster[(Integer A)]) degrees) Unit - Move BurnOrbDummy[(Integer A)] instantly to BurnOrbPoint[(Integer A)], facing (Angle from BurnOrbPointDummy[(Integer A)] to BurnOrbPointCaster[(Integer A)]) degrees If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Integer((Distance between BurnOrbPointDummy[(Integer A)] and BurnOrbPointCaster[(Integer A)]))) Less than or equal to 145 Then - Actions Set BurnOrbInteger[(Integer A)] = (BurnOrbInteger[(Integer A)] - 1) Set BurnOrbCheckAttack[(Integer A)] = False Else - Actions Custom script: call RemoveLocation(udg_BurnOrbPoint[bj_forLoopAIndex]) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbInteger[(Integer A)] Greater than 0 Then - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions BurnOrbCheck[(Integer A)] Equal to True Then - Actions Set BurnOrbInteger[(Integer A)] = 180 Else - Actions Unit - Remove BurnOrbDummy[(Integer A)] from the game Unit - Create 1 Effect for Neutral Passive at BurnOrbPointDummy[(Integer A)] facing Default building facing degrees Unit - Add a 1.00 second Generic expiration timer to (Last created unit) Custom script: call RemoveLocation(udg_BurnOrbPointCaster[bj_forLoopAIndex]) Custom script: call RemoveLocation(udg_BurnOrbPointDummy[bj_forLoopAIndex]) Custom script: call DestroyGroup(udg_BurnOrbGroup[bj_forLoopAIndex]) Set BurnOrbInteger[(Integer A)] = (BurnOrbInteger[(Integer A)] - 1) Else - Actions Custom script: call RemoveLocation(udg_BurnOrbPointCaster[bj_forLoopAIndex]) Custom script: call RemoveLocation(udg_BurnOrbPointDummy[bj_forLoopAIndex]) Else - Actions leak mấy chỗ unit group ấy mà (chắc chắn là còn nhiều hơn) P/S: nếu ko muốn lộ thì sao ra map khác
Chỗ unit group không có leak đâu vì có cái dòng custom script này: Mã: set bj_wantDestroyGroup = true
Cuộc thi hero contest mà lại cho ra map khác à... Rõ ràng tìm đi tìm lại rất kĩ mà làm sao vào map cast nhiều thì nó giật giật ghê vậy nhỉ
Leak của WE: 1.Chỗ mấy cái unit group,tuy là set bj_wantdestroygroup = true rùi nhưng mà lúc nó píck cho vào group là leak rùi,cái này là leak sẵn của blizzard.Khuyến cáo sửa chữa = cách : JASS.Mà hỏi lại anh Tom í,cái này mình ko rành. 2.Dòng 74: Set BurnOrbUnit[(Integer A)] = (Random unit from (Units within (Distance between BurnOrbPointCaster[(Integer A)] and BurnOrbPointTarget[(Integer A)]) of BurnOrbPointCaster[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of BurnOrbCaster[(Integer A)])) Equal to True) Đấy,cái group này chưa destroy nè.
Đôi khi lag là do 1 nguyên nhân khác cũng nên, nhưng chưa thấy spell ra sao thì không thể nói được. Picked Unit có gây leak không nhỉ, chỗ .... deal damage to (PickedUnit) í, có cần set vào biến không...thữ xem
Spell spectre dagger của specte trong dota có cái đường đen chạy theo tảget rất hay,cho em hỏi là làm đường đen đó thế nào ạ?và làm sao để đường đen đó theo target liên tục?
Ừ thì dùng lệnh move instantly và face angle. Nhưng vẫn phải dùng Timer, để canh sao cho đừng create quá nhiều dummy khiến cho nó đen 1 cách quá absolute thì phải dùng thêm biến để đếm (vd đếm dc 3 rồi thì create 1 dummy với trigger có event timer là 0.04) chẳng hạn
Cho em hỏi cái này, em muốn làm một spell khi cast sẽ tạo ra 4 tia lửa phóng ra 4 hướng từ vị trí cast. Sau đó khi unit gặp vật cản như vách tương hoặc unit sẽ dừng lại và deal dam cho vật cản( tất nhiên nếu là vách tường thì không cần dam), độ dài tia lửa sẽ tăng lên theo lvl của spell, anh nào thương em giúp em cái này với, em mò mãi chẳng ra.
Biết cách làm nó move rồi chứ gì? Thí tôi sẽ chỉ cho cách làm nó Collide and Boom. Nói đơn giản thôi nhỉ? Mỗi lần dummy (cục lửa) move thì ta pick group với cái range tầm 200 (tùy vào kích thước của dummy mà cho sao hợp lý) với point là vị trí của dummy, thêm cái match condition vào nữa, ta thêm vào đó: -Matching unit is belong to enemy of owner of casting unit -Matching unit is alive equal to true -Matching unit is hidden equal to false -Matching unit is structure equal to false (nếu không muốn missile banh khi chạm phải nhà) Tạo thêm biến integer, set nó = với số unit trong group trên. Rồi tạo thêm 1 cái If - Then - Else If - biến integer greater than 0 Then - Tự cho các action như damage, kill, effect vào đây rồi cuối cùng thì destroy group Else - Destroy Group Và cứ mỗi condition thì có thêm "and" vào (tiết là không có WE để hướng dẫn hoàn chỉnh) Từ đấy có thể hiểu là mỗi lần move, pick group, check condition. Có enemy không? không thì đi tiếp, có đi kill dummy, create effect, damage! Xong
Mã: Từ đấy có thể hiểu là mỗi lần move, pick group, check condition. Có enemy không? không thì đi tiếp, có đi kill dummy, create effect, damage! Xong [code/]. em hiểu như thế này có được không, ta tạo một triger tạo ra 4 unit cho nó move về 4 hướng, sau đó thêm một triger nữa với event là unit moved. kiểm tra unit type xem phải dummy không, nếu phải thì kiểm tra xem có unit nào nằm trong khu vực đó là enemy không thì dam enemy, kill mummy, con nếu không có thì tiếp tục move unit. Em hiểu như vậy có đúng không. nhưng có thêm hai câu hỏi nửa là làm sao để quảng đường đi của dummy tăng lên theo lvl của skill, và làm sao để skill này MUI. giúp em với, thank.:D