whisky137
Dragon Quest
Thứ nhất làm thế này rất leak,thứ hai là bạn chẳng đặt điều kiện gì cho cái group đó nên khi các unit trước đó chết rồi nhưng vẫn bỏ lại xác,thì nó vẫn tính là 1 đơn vị trong group
Remove leak là một,dùng wait-checking condition sai cách là hai,và rất rất nhiều lý do nữa khiến game bị delay
Bạn ơi, mình edit lại thế này chuẩn chưa, chạy thấy ngon lành rồi, ko biết còn leak gì ko

Đại loại là mình tạo một khu vực riêng. Khi 1 Hero mua "vé" Devil Invation thì vào được khu vực đấy. Từ lúc đó game tạo ra bọn quái để farm. Sau 20s, Hero bị tống cổ về nhà.
Mã:
Invitation
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Devil Invitation
((Triggering unit) is A Hero) Equal to True
Actions
Item - Remove (Item being manipulated)
Unit - Move (Triggering unit) instantly to (Center of Devil Square <gen>)
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Devil Square <gen>) over 0.00 seconds
Trigger - Turn on Devil Square <gen>
Wait 20.00 seconds
Unit - Move (Triggering unit) instantly to (Center of Revive zone <gen>)
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Revive zone <gen>) over 0.00 seconds
Mã:
Devil Square
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set UnitGroup_DevilSquare = (Units in Devil Square <gen> matching ((((Matching unit) belongs to an ally of Player 10 (Light Blue)) Equal to True) and (((Matching unit) is alive) Equal to True)))
Set UnitGroup_Hero = (Units in Devil Square <gen> matching (((Matching unit) is A Hero) Equal to True))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in UnitGroup_DevilSquare) Equal to 0
Then - Actions
Unit - Create 12 Devil Earthbound Infernal for Player 10 (Light Blue) at (Center of Devil Square <gen>) facing Default building facing degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in UnitGroup_Hero) Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Custom script: call DestroyGroup( udg_UnitGroup_DevilSquare )
Custom script: call DestroyGroup( udg_UnitGroup_Hero )
À còn cái nữa, là ai cho mình bài hướng dẫn cụ thể về MUI đi, tỉ năm ko làm bh ko nhớ nữa


