Tom_Kazansky
<b><font color="RoyalBlue"><font face="Lucida Cons
Này, tại sao dùng Array thì Ai cast nó chả ra cái quái gì thế???
ko ra là sao, đưa tôi xem trigger nào ?
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.
Này, tại sao dùng Array thì Ai cast nó chả ra cái quái gì thế???
SlideMove //để OFF sẵn
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SlideTick Equal to 0 //tick = 0, dừng trigger thôi
Then - Actions
Trigger - Turn off (This trigger)
Skip remaining actions
Else - Actions
-------- ---------------- --------
Set SlideTick = (SlideTick - 1) //giảm tick
Set TempLoc = (Position of SlideUnit) //phải cho point vào variable để remove, ko thì sẽ leak
Set TempLoc2 = (TempLoc offset by SlideDistance towards SlideAngle degrees) //phải cho point vào variable để remove, ko thì sẽ leak
Unit - Move SlideUnit instantly to TempLoc2
Special Effect - Create a special effect at TempLoc2 using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl //tạo effect "khói"
Special Effect - Destroy (Last created special effect)
Destructible - Pick every destructible within 200.00 of TempLoc2 and do (Actions)
Loop - Actions
Destructible - Kill (Picked destructible) //phá cây
Custom script: call RemoveLocation( udg_TempLoc ) //cái này để remove leak
Custom script: call RemoveLocation( udg_TempLoc2 ) //cái này để remove leak
Tu Tuong Dong Quy move
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Set TempGroup = (Units of type Tu Tuong Dong Quy <Dummy Unit>)
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Set TempLoc = (Position of (Picked unit))
Unit - Move (Picked unit) instantly to [b](TempLoc offset by 14.00 towards (Facing of (Picked unit)) degrees)[/b], facing (Facing of (Picked unit)) degrees
Custom script: call RemoveLocation(udg_TempLoc)
Custom script: call DestroyGroup(udg_TempGroup)



thì chẳng có giải thích gì cả >> em cũng
luôn.Còn cái MUI nó không cần giải thích nữa là vì có giải thích thì cũng như cái trên"Set SlideTick = 20 //tick = 20, mỗi tick là 0.04 (xem event của trigger Slide) -> cần 20 * 0.04 = 0.8 giây để move xong, tương đương với 0.8s stun ::)
"
-"Đầu tiên có 1 cái loop, vòng lặp từ 1 đến SlideIndex (số slide đang dùng ấy) Nếu SlideIndex = 0 thì ko lặp.
Sau đó kiểm tra SlideTick từ 1 đến SlideIndex, cái nào = 0 thì dừng slide đó, nhg thay vì tắt trigger như trên thì ta giảm SlideIndex."-
For each (Integer B) from (Integer A) to (SlideIndex - 1), do (Actions)
Loop - Actions
Set SlideAngle[(Integer A)] = SlideAngle[((Integer A) + 1)]
Set SlideDistance[(Integer A)] = SlideDistance[((Integer A) + 1)]
Set SlideTick[(Integer A)] = SlideTick[((Integer A) + 1)]
Set SlideUnit[(Integer A)] = SlideUnit[((Integer A) + 1)]
Set SlideIndex = (SlideIndex - 1)
1 2 3 4 5 6 7
1 2 3 4 5 6 7 //cũ: index = 7
1 2 3 5 6 7 //đẩy lùi lại, bây giờ index = 6
còn phía dưới thì cứ move unit bình thường.
Bây giờ Slide đã MUI rồi, 100 unit slide cùng lúc cũng ko sao.


cái này là gì vậy, ví dụ àh?1 2 3 4 5 6 7


thế em muốn slide 4 unit với cùng distance nhưng angel khác nhau (cụ thể là về 4 hướng với góc 90 dreege) thì phải làm thế nào.
------ ------
Set SlideIndex = (SlideIndex + 1)
Set SlideUnit[SlideIndex] = [COLOR="Blue"]<unit "bị" Slide>[/COLOR]
Set SlideAngle[SlideIndex] = [COLOR="Blue"]<góc Slide>[/COLOR]
Set SlideTick[SlideIndex] = [COLOR="Blue"]<thời gian slide / 0.04>[/COLOR]
Set SlideDistance[SlideIndex] = [COLOR="Blue"]<khoảng cách Slide>[/COLOR] / SlideTick[SlideIndex]
------ ------
Flame
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Bomb
Actions
Set Int4 = 4.00
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
Unit - Create 1 Flame for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Set SlideUnit[(Integer A)] = (Last created unit)
Set SlideAngle[(Integer A)] = (Int4 x 90.00)
Set SlideTick[(Integer A)] = 20
Set FlamePoint = (Position of (Triggering unit))
Set Int4 = (Int4 - 1.00)
khi test thì thấy có tạo unit thật, nhưng không slide. Có thể cho em biết em sai cho nào không.Flame Slide
Events
Time - Elapsed game time is 0.04 seconds
Conditions
Actions
For each (Integer A) from 1 to SlideIndex, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SlideTick[(Integer A)] Equal to 0
Then - Actions
Unit - Remove SlideUnit[(Integer A)] from the game
For each (Integer B) from (Integer A) to (SlideIndex - 1), do (Actions)
Loop - Actions
Set SlideAngle[(Integer A)] = (SlideAngle[(Integer A)] + 1.00)
Set SlideTick[(Integer A)] = (SlideTick[(Integer A)] + 1)
Set SlideUnit[(Integer A)] = SlideUnit[((Integer A) + 1)]
Set SlideIndex = (SlideIndex - 1)
Else - Actions
-------- ------- ------------------- ------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SlideTick[(Integer A)] Greater than 0
Then - Actions
Set SlideTick[(Integer A)] = (SlideTick[(Integer A)] - 1)
Set FlamePoint = (FlamePoint offset by 200.00 towards SlideAngle[(Integer A)] degrees)
Unit - Move SlideUnit[(Integer A)] instantly to (Center of (Playable map area))
Unit Group - Pick every unit in (Units in (Region centered at FlamePoint with size (200.00, 200.00))) and do (Unit Group - Add (Picked unit) to BombTaget)
Unit - Remove (Picked unit) from the game
Else - Actions