Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Tạo model@anh Tom: em muốn hỏi về cách để tạo ra cái cục màu vàng chứ ko phải là cách attach vào vị trí ạ![]()

[spoil]Còn lỗi mà map vẫn chạy và ko có báo lỗi vẫn có thể xảy ra huống chi có báo lỗi, nhưng trigger có chạy bình thường ko thì còn tùy =>Tốt nhất là đừng để nó báo lỗi như thế
function Deal_Damage takes unit u, string s, real h returns nothing
Blah.. blah...
endfunction
function InitTrig_Effect takes nothing returns nothing
set gg_trg_Effect = CreateTrigger( )
call TriggerAddAction( gg_trg_Effect, function Deal_Damage )
endfunction
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to (==) Spell
Actions
Custom script: call Deal_Damage( GetTriggerUnit(), "Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl", 40 )
, nhưng vẫn có effectVậy xóa 1 trigger có thể giữ bộ nhớ tốt hơn ? Nhưng mình tìm hiểu thì có người bảo không nên vì sẽ dễ crash, vậy với trigger xài 1 lần hay đến lúc ko cần nữa thì destroy được không ?FlameDrake nói là ví dụ cụ thể còn hiểu về mặt ý nghĩa là:
Trigger cũng cần tạo và có thể hủy giống như nhiều thứ khác trong WE nó cũng là 1 thể loại handle và có ID riêng biệt
Chả cần biết vì sao đặt wait. Chỉ biết là đặt wait trong trường hợp này chắc chắn sẽ bug. Hơn nữa, wait 0.02s thực chất là wait tầm 0.27~0.3s, nếu muốn chính xác phải dùng timer.
Và một khi nghĩ ra cách làm thì phải đảm bảo 100% là nó hoạt động bình thường. Đơn cử spell Healing Wave, chả gây damage cho đứa nào mà trigger như thế kia thì chắc chắn sẽ có vấn đề, chưa kể những passive gây damage spell thì định tính sao?
Nói chung cách nào thì cách nhưng chắc chắn cách này không dùng được. Và trong số các cách tôi thấy cách dùng Orb Effect kiểu Poison ở trên là hợp nhất rồi.
-----------------------
Soul Burn có bị làm sao đâu nhở? Tôi vẫn dùng bình thường mà ?
của em bị lỗi em mới hỏi? Map ng ta dùng bt mà map em là lag hà hk hiểu tại sao lun! 
Ơ em chỉ HD, tùy người dùng tri thức tới mức độ nào !@@
.Vậy xóa 1 trigger có thể giữ bộ nhớ tốt hơn ? Nhưng mình tìm hiểu thì có người bảo không nên vì sẽ dễ crash, vậy với trigger xài 1 lần hay đến lúc ko cần nữa thì destroy được không ?
^x2: em chỉnh thành 99 có sao hk anh? à còn nữa, tự dưng thỉnh thoảng map em dùng lightning effect = trigger thì lâu lâu nó bị văng ra ngoài và báo lỗi! Anh giúp em với
Cho mình hỏi cái Animation - Cast Back càng cao thì tốc độ xuất chiêu của Hero phải ko mấy bạn.
[spoil]Mã:function Deal_Damage takes unit u, string s, real h returns nothing Blah.. blah... endfunction function InitTrig_Effect takes nothing returns nothing set gg_trg_Effect = CreateTrigger( ) call TriggerAddAction( gg_trg_Effect, function Deal_Damage ) endfunction[/spoil]Mã:Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to (==) Spell Actions Custom script: call Deal_Damage( GetTriggerUnit(), "Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl", 40 )
Gọi kiểu như trên và nó báo lỗi trigger 1, nhưng vẫn có effect
Vậy xóa 1 trigger có thể giữ bộ nhớ tốt hơn ? Nhưng mình tìm hiểu thì có người bảo không nên vì sẽ dễ crash, vậy với trigger xài 1 lần hay đến lúc ko cần nữa thì destroy được không ?
Cho hỏi làm sao để thay đổi model khi creep chết thì được tiền và thay đổi màu tiền nhận được lúc creep chết và thay đổi icon tiền vàng trên góc phải màn hình ? Thanks nhìu.
.Cho hỏi làm sao để thay đổi model khi creep chết thì được tiền và thay đổi màu tiền nhận được lúc creep chết và thay đổi icon tiền vàng trên góc phải màn hình ? Thanks nhìu.



Lightning Strike
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Lightning Strike
Actions
Set Caster[2] = (Triggering unit)
Set Target[2] = (Target unit of ability being cast)
Set CastPoint[2] = (Position of Caster[2])
Set CastPlayer[1] = (Owner of Caster[2])
Set IntAbi[1] = (Level of Lightning Strike for Caster[2])
Set IntAbi[2] = (Strength of Caster[2] (Include bonuses))
Set IntAbi[3] = (10 x (Level of Lightning Strike for Caster[2]))
Set RealAbi[1] = (X of Target[2])
Set RealAbi[2] = (Y of Target[2])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(IntAbi[1] Equal to 1) or (IntAbi[1] Equal to 2)
Then - Actions
Set IntAbi[4] = 4
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(IntAbi[1] Equal to 3) or (IntAbi[1] Equal to 4)
Then - Actions
Set IntAbi[4] = 5
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(IntAbi[1] Equal to 5) or (IntAbi[1] Equal to 6)
Then - Actions
Set IntAbi[4] = 6
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(IntAbi[1] Equal to 7) or (IntAbi[1] Equal to 8)
Then - Actions
Set IntAbi[4] = 7
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(IntAbi[1] Equal to 9) or (IntAbi[1] Equal to 10)
Then - Actions
Set IntAbi[4] = 8
Else - Actions
Do nothing
Set dam[2] = (5.00 x ((Real(IntAbi[1])) x (Real(IntAbi[2]))))
Special Effect - Destroy (Create a special effect using Great Lightning.mdx On Target[2] 's origin)
Special Effect - Destroy (Create a special effect using Abilities\Weapons\Bolt\BoltImpact.mdl On Target[2] 's origin)
Unit - Cause Caster[2] to damage Target[2], dealing dam[2] damage of attack type Magic and damage type Lightning
Custom script: call Text(udg_Target[2],"+ "+ I2S(R2I((udg_dam[2]))), 1.5, "|c00FFF0FF")
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 100) Less than or equal to IntAbi[3]
Then - Actions
Unit - Create 1 Dummy for CastPlayer[1] at CastPoint[2] facing Default building facing degrees
Set Dummy[1] = (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to Dummy[1]
Unit - Add Stun [Dummy] to Dummy[1]
Unit - Set level of Stun [Dummy] for Dummy[1] to 1
Unit - Order Dummy[1] to Human Mountain King - Storm Bolt Target[2]
Custom script: call RemoveLocation(udg_CastPoint[2])
Else - Actions
Set Group[2] = (Units within 800.00 of (CastPoint[2] offset by (RealAbi[1], RealAbi[2])) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) Equal to No unit) or (IntAbi[4] Equal to 0)
Then - Actions
Do nothing
Else - Actions
Unit Group - Pick every unit in Group[2] and do (Actions)
Loop - Actions
Wait 0.20 seconds
Special Effect - Destroy (Create a special effect using Great Lightning.mdx On (Picked unit) 's origin)
Special Effect - Destroy (Create a special effect using Abilities\Weapons\Bolt\BoltImpact.mdl On (Picked unit) 's origin)
Unit - Cause Caster[2] to damage (Picked unit), dealing dam[2] damage of attack type Magic and damage type Lightning
Custom script: call Text(GetEnumUnit(),"+ "+ I2S(R2I((udg_dam[2]))), 1.5, "|c00FFF0FF")
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 100) Less than or equal to IntAbi[3]
Then - Actions
Unit - Create 1 Dummy for CastPlayer[1] at CastPoint[2] facing Default building facing degrees
Set Dummy[1] = (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to Dummy[1]
Unit - Add Stun [Dummy] to Dummy[1]
Unit - Set level of Stun [Dummy] for Dummy[1] to 1
Unit - Order Dummy[1] to Human Mountain King - Storm Bolt Target[2]
Custom script: call RemoveLocation(udg_CastPoint[2])
Else - Actions
Custom script: call DestroyGroup (udg_Group[2])
Custom script: set udg_CastPlayer[1] = null
Set IntAbi[4] = (IntAbi[4] - 1)
[spoil][/spoil]Mã:[COLOR="#0000FF"]If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Random integer number between 1 and 100) Less than or equal to IntAbi[3] Then - Actions ................. Custom script: call RemoveLocation(udg_CastPoint[2]) Else - Actions[/COLOR] Set Group[2] = (Units within 800.00 of ([COLOR="#FF0000"]CastPoint[2][/COLOR] offset by [COLOR="#FF0000"](RealAbi[1], RealAbi[2]))[/COLOR] matching ... If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions [COLOR="#FF0000"]((Picked unit)[/COLOR] Equal to No unit) or [COLOR="#008000"](IntAbi[4] Equal to 0)[/COLOR] Then - Actions Do nothing Else - Actions Unit Group - Pick every unit in Group[2] and do (Actions) Loop - Actions [COLOR="#0000FF"]Wait 0.20 seconds[/COLOR] Special Effect - Destroy (Create a special effect using Great Lightning.mdx On (Picked unit) 's origin) Special Effect - Destroy (Create a special effect using Abilities\Weapons\Bolt\BoltImpact.mdl On (Picked unit) 's origin) Unit - Cause Caster[2] to damage (Picked unit), dealing dam[2] damage of attack type Magic and damage type Lightning Custom script: call Text(GetEnumUnit(),"+ "+ I2S(R2I((udg_dam[2]))), 1.5, "|c00FFF0FF") If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Random integer number between 1 and 100) Less than or equal to IntAbi[3] Then - Actions Unit - Create 1 Dummy for CastPlayer[1] at CastPoint[2] facing Default building facing degrees Set Dummy[1] = (Last created unit) Unit - Add a 1.00 second Generic expiration timer to Dummy[1] Unit - Add Stun [Dummy] to Dummy[1] Unit - Set level of Stun [Dummy] for Dummy[1] to 1 Unit - Order Dummy[1] to Human Mountain King - Storm Bolt Target[2] [COLOR="#FF0000"]Custom script: call RemoveLocation(udg_CastPoint[2])[/COLOR] Else - Actions Custom script: call DestroyGroup (udg_Group[2]) Custom script: set udg_CastPlayer[1] = null [COLOR="#006400"]Set IntAbi[4] = (IntAbi[4] - 1)[/COLOR]
Làm nhiều Item từ bottle 0/3, 1/3, 2/3, 3/3 (Cho shop bán item 0/3) và bottle có rune tương ứng, sau đó set vào các biến. Với event unit uses an item, check biến item unit có và thay item khác vào. Và trigger unit enter/ở trong khu vực bơm máu thì thay bình 3/3 nếu có bình 0-1-2/3.Cho mình hỏi có ai bít cách làm "Bottle" trong dota không vậy?
