Trigger duel thì của tui nghiên cứu khác tên Kemytaru gì đó.. Hồi đó làm khác.. Cái Reaper Arena là tui soạn lại luôn đó..
Về map thì mỗi map có những thông số khác nhau, cấu trúc và cách thưởng cũng khác nhau.. tui đưa trigger trong map tui đây: (cần 4 Triggers)
Phần Setup cho 1 duel sắp xảy ra:
Event : tùy
Condition: tùy
Action:
Countdown Timer - Start DuelTImer as a One-shot timer that will expire in 420.00 seconds
Countdown Timer - Create a timer window for DuelTImer with title Next Pit Duel
Set DuelTImer = (Last started timer)
Countdown Timer - Show DuelTimerWindow
--------- Hết cơ bản, DuelTImer là 1 variable thuộc dạng Time
Trigger Start Duel:
Event: Time - DuelTImer expires
Conditions: Tùy
Action:
//---Thao tác ngưng đọng mọi thứ--//
Unit - Pause all units
Set bPaused = True (tránh bug, bPaused là variable bolean)
Set bDuel = True (tránh bug, Duel là variable bolean)
Player Group - Pick every player in (All players) and do (Camera - Pan camera for (Picked player) to (Center of Dueling Pit <gen>) over 1.00 seconds)
//---Thao tác lưu vị trí của Hero--//
For each (Integer A) from 1 to 12, do (Set HeroSavePoints[(Integer A)] = (Position of Heroes[(Integer A)]))
For each (Integer A) from 1 to 12, do (Set HeroSaveDirection[(Integer A)] = (Facing of Heroes[(Integer A)]))
//---Thao tác di chuyển Hero--//
For each (Integer A) from 1 to 12, do (Unit - Move Heroes[(Integer A)] instantly to (Center of HeroDuelSpots[(Integer A)]))
For each (Integer A) from 1 to 12, do (Unit - Make Heroes[(Integer A)] face (Center of Dueling Pit <gen>) over 0.00 seconds)
//---Thao tác chọn Hero ra đấu--//
Set TempMaxKill = 0
For each (Integer A) from 1 to 3, do (If ((Kills[(Integer A)] Greater than TempMaxKill) and ((((Player((Integer A))) slot status) Equal to Is playing) or (((Player((Integer A))) controller) Equal to Computer))) then do (Set TempMaxKill = Kills[(Integer A)]) else do (Do nothing))
For each (Integer A) from 1 to 3, do (If ((Kills[(Integer A)] Equal to TempMaxKill) and ((((Player((Integer A))) slot status) Equal to Is playing) or (((Player((Integer A))) controller) Equal to Computer))) then do (Set Team1Leader = (Integer A)) else do (Do nothing))
Set Team1LeaderHero = Heroes[Team1Leader]
Unit - Move Team1LeaderHero instantly to (Center of Team1HeroDuel <gen>)
Unit - Set life of Team1LeaderHero to 100.00%
Unit - Set mana of Team1LeaderHero to 100.00%
Unit - Make Team1LeaderHero Vulnerable
////--- Lặp lại tương tự, ở trên là team 1, players mang số từ 1 đến 3, làm tiếp thao tác lặp Interger với các nhóm còn lại như 4->6, .v.vv.
//-- Cho đấu--//
Wait 5.00 seconds (hoặc bao nhiêu tùy)
Unit - Unpause Team1LeaderHero
Unit - Unpause Team2LeaderHero
...
Unit - Make Team1LeaderHero Vulnerable
Unit - Make Team2LeaderHero Vulnerable
...
----------- Hết trigger startduel về cơ bản..
Trigger Duel to End (nhận biết hết duel hay chưa)
Event: Unit - A unit Dies
Conditions:
((Dying unit) is A Hero) Equal to True
bDuel equal to true
Action:
If ((Number of units in (Units in Dueling Pit <gen> matching (((Matching unit) is A Hero) Equal to True))) Equal to 1) then do (Trigger - Run End Duel <gen> (ignoring conditions)) else do (Do nothing)
Wait 2.00 seconds
If ((Number of units in (Units in Dueling Pit <gen> matching (((Matching unit) is A Hero) Equal to True))) Equal to 1) then do (If (bDuel Equal to True) then do (Set bDuel = False) else do (Do nothing)) else do (Do nothing)
---------- Kết thúc nhận biết
Trigger End Duel:
(cái này ko có event vì nó chỉ run khi cái Duel to End kích hoạt nó)
Action:
//--pauser và thưởng cho players--//
Unit - Pause all units
Unit Group - Pick every unit in (Units in Dueling Pit <gen> matching (((Matching unit) is A Hero) Equal to True)) and do (Set currentKiller = (Player number of (Owner of (Picked unit))))
Set currentTeam = (((currentKiller - 1) / n) + 1) /--n là số người mỗi team, Reaper Arena thì n là 3, Map Corridor của tui thì n là 6)
... (Như vậy là đã có variable cho người chiến thắng và team của người chiến thắng trong map mỗi team có n người, muốn thưởng gì cứ lập action cho 2 variable này)
//--Trả Heroes về vị trí cũ--//
Wait 3.00 seconds
Unit - Pause all units (phòng hờ heroes khác hồi sinh và hoạt động được)
For each (Integer A) from 1 to 12, do (Unit - Move Heroes[(Integer A)] instantly to HeroSavePoints[(Integer A)], facing HeroSaveDirection[(Integer A)] degrees)
For each (Integer A) from 1 to 12, do (Unit - Make Heroes[(Integer A)] Vulnerable)
For each (Integer A) from 1 to 12, do (Camera - Pan camera for (Player((Integer A))) to HeroSavePoints[(Integer A)] over 1.00 seconds)
Wait 2.00 seconds
Unit - Pause all units
Set bDuel = False
Set bPaused = False
Unit - Unpause all units
//--Reset thông số chuẩn bị cho duel kế--//
Set Team1Leader = 14
Set Team2Leader = 14
..
Set Team1LeaderHero = No unit
Set Team2LeaderHero = No unit
..
Countdown Timer - Start DuelTImer as a One-shot timer that will expire in 360.00 seconds (Thời gian tùy ý map maker)
-------- Hết Trigger End Duel
Have fun! Copy right by Mr.Atula ^^
Chủ Nhật tới mới được online... mà thứ 2 tới thì thi

Hông bít online típ được ko.. he he