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.
!
Cho em hỏi vị trí của số lượng các ô chứa của hero ở đâu trong worldedit vậy![]()

Em muốn xin dòng điều kiện "Unit x còn % HP" và "Unit x còn % MP" được không ạ!
Check Life and Mana
Events
-------- Events thì tự chọn -------
Conditions
Actions
-------- Check Life --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
[B](((Life of (Triggering unit))[/B] / [B](Max life of (Triggering unit)))[/B] x 100.00) Equal to 10.00
Then - Actions
-------- Thích làm gì thì làm --------
Else - Actions
-------- Check Mana --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
[B](((Mana of (Triggering unit))[/B] / [B](Max mana of (Triggering unit)))[/B] x 100.00) Equal to 10.00
Then - Actions
-------- Thích làm gì thì làm --------
Else - Actions
Circle Pit
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Circle Pit
Actions
[B]Set CirclePitTimes = (CirclePitTimes + 1)[/B]
Set CirclePitCaster = (Casting unit)
Set CirclePitTargetPoint = (Target point of ability being cast)
Set CirlcePitRegion = (Region centered at CirclePitTargetPoint with size (410.00, 400.00))
Set CirclePitStopGroup = (Units within 410.00 of CirclePitTargetPoint matching (((Matching unit) belongs to an enemy of (Owner of CirclePitCaster)) Equal to True))
Unit Group - Pick every unit in CirclePitStopGroup and do (Actions)
Loop - Actions
Set CirclePitStopVictim = (Picked unit)
Set CirclePitPickLoc = (Position of CirclePitStopVictim)
Unit Group - Remove CirclePitStopVictim from CirclePitGroup
Unit - Create 1 Dummy Human (Stand) for (Owner of CirclePitCaster) at CirclePitPickLoc facing Default building facing degrees
Unit - Add Circle Pit Effect (Senth) to (Last created unit)
Unit - Set level of Circle Pit Effect (Senth) for (Last created unit) to (Level of Circle Pit for CirclePitCaster)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Orc Raider - Ensnare CirclePitStopVictim
Custom script: call RemoveLocation(udg_CirclePitPickLoc)
For each (Integer A) from 1 to 16, do (Actions)
Loop - Actions
Set CirclePitPoint[((Integer A) + (CirclePitTimes x 16))] = (CirclePitTargetPoint offset by 365.00 towards (22.50 x (Real((Integer A)))) degrees)
Special Effect - Create a special effect at CirclePitPoint[((Integer A) + (CirclePitTimes x 16))] using Abilities\Spells\Undead\Graveyard\GraveMarker.mdl
Set CirclePitEffect[((Integer A) + (CirclePitTimes x 16))] = (Last created special effect)
Wait 6.00 seconds
Set CirlcePitRegion = No region
For each (Integer B) from 1 to 16, do (Actions)
Loop - Actions
[B]Special Effect - Destroy CirclePitEffect[((Integer B) + (CirclePitTimes x 16))][/B]
Có dòng Unit-Remove ability màlàm thế nào để remove abillity khỏi ng` unit ? ví dụ như abi locus ý ạ
.Timer
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set Integer = (Integer + 1)
Unit - Create 1 Unit for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Unit for Player 2 (Blue) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Unit for Player 3 (Teal) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Unit for Player 4 (Purple) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Unit for Player 5 (Yellow) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Unit for Player 6 (Orange) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Unit for Player 7 (Green) at (Center of (Playable map area)) facing Default building facing degrees
-------- Tạo Unit cho tất cả các player là ok --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Integer Equal to 60
Then - Actions
Set Integer = 0
Unit Group - Pick every unit in (Units of type Footman) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Add 1 to (Picked player) Current lumber
Else - Actions
Với điều kiện là map đảm bảo kô xài đến Lumber và Food.
Thế này nhé:
Chuẩn bị 1 Unit có tên là abc gì đó. Add Ability Locust cho Unit đó, chỉnh model = none.mdl, và cái quan trọng đây: chỉnh Food Cost của Unit là 1.
_Tạo 1 trigger:
Mã:Timer Events Time - Every 1.00 seconds of game time Conditions Actions Set Integer = (Integer + 1) Unit - Create 1 Unit for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees Unit - Create 1 Unit for Player 2 (Blue) at (Center of (Playable map area)) facing Default building facing degrees Unit - Create 1 Unit for Player 3 (Teal) at (Center of (Playable map area)) facing Default building facing degrees Unit - Create 1 Unit for Player 4 (Purple) at (Center of (Playable map area)) facing Default building facing degrees Unit - Create 1 Unit for Player 5 (Yellow) at (Center of (Playable map area)) facing Default building facing degrees Unit - Create 1 Unit for Player 6 (Orange) at (Center of (Playable map area)) facing Default building facing degrees Unit - Create 1 Unit for Player 7 (Green) at (Center of (Playable map area)) facing Default building facing degrees -------- Tạo Unit cho tất cả các player là ok -------- If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Integer Equal to 60 Then - Actions Set Integer = 0 Unit Group - Pick every unit in (Units of type Footman) and do (Actions) Loop - Actions Unit - Remove (Picked unit) from the game Player Group - Pick every player in (All players) and do (Actions) Loop - Actions Player - Add 1 to (Picked player) Current lumber Else - Actions
Giải thích: Mỗi 1 giây tạo 1 Unit có Food = 1 tức là mỗi giây Food sẽ tăng 1 => Số Food chính là số giây. Sau đó sẽ Set Integer thêm 1. Ở đây số Integer tăng đồng thời với số Food => Integer luôn luôn = Food => khi Integer = 60 thì Food cũng bằng 60 <=> số giây hiện thời là 60.
Dòng If là kiểm tra Integer = 60 thì sẽ Set Integer = 0 và Remove toàn bộ Unit => Số Food = 0 và tăng thêm 1 gỗ <=> tăng thêm 1 phút.