cho hỏi lỗi 5 trigger này:
2 Trigger đầu của skill Cage Of Eden
[spoil]
Mã:
Cage of Eden
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Cage Of Eden
Actions
Set MUI[9] = (MUI[9] + 1)
Set Loc[9] = (Position of (Triggering unit))
Set LevelMUI[MUI[9]] = (Level of Cage Of Eden for (Triggering unit))
Set RealMUI[MUI[9]] = 5.00
Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at Loc[9] facing Default building facing degrees
Set DummyMUI[MUI[9]] = (Last created unit)
Unit - Add Cage Dummy to DummyMUI[MUI[9]]
Unit - Set level of Cage Dummy for DummyMUI[MUI[9]] to LevelMUI[MUI[9]]
Set Group[2] = (Units within 500.00 of Loc[9] matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)))
Unit Group - Pick every unit in Group[2] and do (Actions)
Loop - Actions
Unit - Order DummyMUI[MUI[9]] to Night Elf Keeper Of The Grove - Entangling Roots (Picked unit)
Custom script: call DestroyGroup( udg_Group[2] )
For each (Integer A) from 1 to 18, do (Actions)
Loop - Actions
Set Loc[10] = (Loc[9] offset by 500.00 towards ((Real((Integer A))) x 20.00) degrees)
Destructible - Create a Summer Tree Wall at Loc[10] facing (Random angle) with scale 1.00 and variation 0
Trigger - Turn on CoE Loop <gen>
EGUI Leak - Remove Loc[9]
EGUI Leak - Remove Loc[10]
Mã:
CoE Loop
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
For each (Integer MUI2[9]) from 1 to MUI[9], do (Actions)
Loop - Actions
Set LocMUI[MUI2[9]] = (Position of DummyMUI[MUI2[9]])
Set RealMUI[MUI2[9]] = (RealMUI[MUI2[9]] - 1.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
[B]RealMUI[MUI2[9]] Equal to 0.00[/B]
Then - Actions
Unit - Remove DummyMUI[MUI2[9]] from the game
Destructible - Pick every destructible within 600.00 of LocMUI[MUI2[9]] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
Then - Actions
Destructible - Remove (Picked destructible)
Else - Actions
Set MUI[9] = (MUI[9] - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MUI[9] Equal to 0
Then - Actions
Set MUI2[9] = 0
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
EGUI Leak - Remove LocMUI[MUI2[9]]
[/spoil]
3 trigger tiếp theo của skill Narural Order :
[spoil]
Mã:
Nature Order
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Natural Order (Spell)
Actions
Set MUI[10] = (MUI[10] + 1)
Set Destructibles[MUI[10]] = (Target destructible of ability being cast)
Set LocMUI[MUI[10]] = (Position of Destructibles[MUI[10]])
Set CasterMUI[MUI[10]] = (Triggering unit)
Set RealMUI[MUI[10]] = 2.00
Set LevelMUI[MUI[10]] = (Level of Natural Order (Spell) for CasterMUI[MUI[10]])
Unit - Add Release to CasterMUI[MUI[10]]
Unit - Set level of Release for CasterMUI[MUI[10]] to LevelMUI[MUI[10]]
Player - Disable Natural Order (Spell) for (Owner of CasterMUI[MUI[10]])
Trigger - Turn on Release Order <gen>
Trigger - Turn on Nature Loop <gen>
Mã:
Nature Loop
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
For each (Integer MUI2[10]) from 1 to MUI[10], do (Actions)
Loop - Actions
Set RealMUI[MUI2[10]] = (RealMUI[MUI2[10]] - 1.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RealMUI[MUI2[10]] Less than or equal to 0.00
Then - Actions
Set MUI[10] = (MUI[10] - 1)
Unit - Remove Release from CasterMUI[MUI2[10]]
Player - Enable Natural Order (Spell) for (Owner of CasterMUI[MUI2[10]])
EGUI Leak - Remove Loc[12]
EGUI Leak - Remove Loc[13]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MUI[10] Equal to 0
Then - Actions
Set MUI2[10] = 0
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
Mã:
Release Order
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Release
Actions
For each (Integer MUI2[10]) from 1 to MUI[10], do (Actions)
Loop - Actions
Set Loc[13] = (Target point of ability being cast)
Unit - Create 1 Dummy Caster for (Owner of CasterMUI[MUI2[10]]) at LocMUI[MUI2[10]] facing Default building facing degrees
Set Dummy[8] = (Last created unit)
Unit - Add a 0.50 second Generic expiration timer to Dummy[8]
Unit - Add Nature's Order to Dummy[8]
Unit - Set level of Nature's Order for Dummy[8] to LevelMUI[MUI2[10]]
Unit - Order Dummy[8] to Orc Tauren Chieftain - Shockwave Loc[13]
[B]Set RealMUI[MUI2[10]] = 0.00[/B]
EGUI Leak - Remove LocMUI[MUI2[10]]
EGUI Leak - Remove Loc[13]
Trigger - Turn off (This trigger)
[/spoil]
Skill Cage Of Eden: dùng để tạo ra 1 vòng tròn cây nhốt đối thủ lại trong 5s. Sau 5s sẽ tiêu diệt hết các cây đã tạo:
Skill Natural Order : target vào 1 cái cây sẽ cho skill dummy ( Release ) trong 2s. trong 2s đó nếu target vào ground sẽ bắn ra 1 đường shockwave r bỏ skill dummy, sau 2s nếu k target vào ground sẽ mất skill dummy.
Vấn đề : Khi sử dụng Cage Of Eden r` target Natural Order thì lập lức các cây được tạo ra từ Cage of eden lập tức biến mất.
Mặc dù e đã set Loop là 2 biến For MUI2[9] ...... và For MUI2[10] riêng biệt nhau. vậy s vẫn bị đụng về biến RealMUI ở 2 trigger