Topic hỏi đáp cho anh em (Về cách làm map)

Status
Không mở trả lời sau này.
cho em hỏi làm thế nào để chuyển item từ slot này qua slot khác = trigger?
 
Em muốn xin dòng điều kiện "Unit x còn % HP" và "Unit x còn % MP" được không ạ :D!
 
Cho em hỏi vị trí của số lượng các ô chứa của hero ở đâu trong worldedit vậy :-w
 
ý của bạn là button của hero phải ko ?
nếu vậy thì tìm ở dòng này , bật F6 vào phần Units rồi click vào hero
Art-Button X
Art-Button 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 ạ :D!

Mã:
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

Conditions là loại Real Comparison. Còn mấy dòng bôi đen nằm ở Unit - Property.

Giải thích: Ở đây là làm phép tính tìm tỉ số % giữa Life/Mana hiện thời của Unit với Life/Mana tối đa của Unit. Thế này nhé:
Life/Mana hiện thời của Unit là: 5
Life/Mana Max của Unit là: 10
5 / 10 x 100 = 0.5 x 100 = 50%.
=> Life/Mana hiện thời của Unit chiếm 50% so với Life/Mana Max của Unit.
 
Bạn game_war48, cám ơn bạn vì đã chỉ mình effect create corpse (special) của skill Pit of Malice. Mình thử làm 1 skill Circle Pit tương tự như vậy, mọi thứ khá ổn, chỉ trừ phần hi65u ứng. Giả sử dùng Refresh Orb, hoặc cooldown < 6s (thời gian tồn tại của effect) thì chỉ xóa effect sau, ko xóa effect trước. Bạn có thể giúp mình hoàn chỉnh skill Pit of Malice giống trong Dota được ko ? Cám ơn bạn nhiều nhé. Sau đây là code của mình :

Mã:
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]
 
bạn này trình bày tốt phải chi mấy mem khác hỏi cũng vậy thì hay
mà sao cái loop lại là integer B ????
 
Từ từ..thôi spam cái nài nhá...Cho em hỏi nếu tao một bảng Multi để show creep kill trong 1 map chẳng hạn..Em muốn làm như DotA thì làm như thế nào...làm mà nếu không có player nào thì nó loại player đó ra khỏi MultiBoard????
 
Chỉ cho mình cách làm 1 spell như này với : "1 Hero học 2 skill A và B, A là 1 skill biến hình (chẳng hạn Robo Goblbin) còn B là 1 skill passive. Khi biến hình (tức là xài skill A) thì skill B mới có tác dụng. Khi biến hình trở lại thì 2s sau skill B mới mất tác dụng". Cái này chắc gần giống Balanar của Dota nhỉ :).
 
Ai chỉ em cách làm chọn tướng giống như Dotta và Tổng hơp với.Anh danny đưa cái web toàn tiếng anh đọc chả hiểu gì
 
Em muốn xin một vài cái trigger cheat map để test được không vậy? Ví dụ như khi gõ kí tự "x" thì phục hồi 100% HP và MP, khi gõ "y" thì up 1 level, khi gõ "k" thì tăng 10 điểm str chẳng hạn!
 
làm thế nào để remove abillity khỏi ng` unit ? ví dụ như abi locus ý ạ
 
Mã:
call UnitRemoveAbility( 'Aloc', GetTriggerUnit() )
thử cái đó xem coi đc ko
 
Ai giúp mình cách làm đồng hồ tính time đã chơi như trong Dota dc ko T___T
 
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 Unit1.
_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.
 
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 Unit1.
_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.

Vậy làm sao thay dc icon và tên gọi cho vị trí của lumber và food vậy bạn ?___?
 
Vào phần Advanced > Gameplay Interface > Icon - Food/ Icon - Lumber.
 
Status
Không mở trả lời sau này.
Back
Top