Topic hỏi đáp về cách làm map | version 11

Status
Không mở trả lời sau này.
Mọi ng` cho e hỏi e sử dụng cái trigger tạo hero trong map DotaTemplate v6.1 thì khi 1 người chơi pick hero thi bình thường nhưng 2 người chơi 1 người team 1 1 người team 2 thì người bên team 1 pick hero thì nó không tạo hero cho người team 1 mà nó lại tạo hero cho người team 2 ai bít cách sửa mong mọi người sửa dùm e
Link 1 - Link 2
 
sửa mấy cái chỉ số như Lumber , Food thành Timer rồi mấy cái như DotA chỉnh ở đâu mọi người :)
 
Mình định làm 1 map đánh theo lượt, sử dụng countdown timer. Có cách nào để dừng countdown timer lại 1 thời gian rồi lại chạy tiếp không? Ví dụ sau 30s thì hết lượt nhưng đến 20s thì có 1 event xảy ra, hết event thì lại chạy tiếp. Bạn nào làm được trigger như vậy = Gui thì hướng dẫn mình với, cám ơn trước.
 
sửa mấy cái chỉ số như Lumber , Food thành Timer rồi mấy cái như DotA chỉnh ở đâu mọi người :)

vào Game Interface, chỉnh chữ Lumber/Food thành Phút/Giây (cái này tùy)

trigger thì:
Mã:
GameTimer
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set ElapsedSeconds = (ElapsedSeconds + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ElapsedSeconds Equal to 60
            Then - Actions
                Set ElapsedSeconds = 0
                Set ElapsedMinutes = (ElapsedMinutes + 1)
            Else - Actions
        -------- ------------ --------
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Set (Picked player) Current lumber to ElapsedMinutes
                Player - Set (Picked player) Food used to ElapsedSeconds

ElapsedSeconds, ElapsedMinutes: integer variables

Zúp e câu này với :( Thanks nhìu

Cách ghép đồ, có thể ghép nhiều item cùng loại và "nhập" các item sử dụng theo "charge".
 
anh Tom cho em hỏi mấy cái trigger sau đây có leak ko , và nếu có xin anh viết cho em vài dòng cụ thể (vì em đã set variable và Remove Unit Group leak ,nhưng chức năng của những spell không thể chạy)

Mã:
Getsuga Tenshou
    Events
        Unit - A unit Begins casting an ability
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Ability being cast) Equal to Q Getsuga Tenshou 
                (Ability being cast) Equal to Q Getsuga Tenshou 
    Actions
        Sound - Play ic1 <gen>
        Set GetsugaPoint = (Target point of ability being cast)
        Set GetCastP = (Position of (Triggering unit))
        Wait 0.35 seconds
        Unit - Create 1 Footman for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) has buff Bankai ) Equal to False
            Then - Actions
                Unit - Add Getuga Tenshou ! blue to (Last created unit)
            Else - Actions
                Unit - Add Getuga Tenshou ! Black to (Last created unit)
        Unit - Add a 0.40 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm GetsugaPoint
        For each (Integer A) from 0 to 8, do (Actions)
            Loop - Actions
                Wait 0.01 seconds
                Unit Group - Pick every unit in (Units within 250.00 of (GetsugaPoint offset by (100.00 x (Real((Integer A)))) towards (Angle from GetCastP to GetsugaPoint) degrees) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching  and do (Actions)
                    Loop - Actions
                        Unit Group - Add (Picked unit) to GetKnocked
                        Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
        Unit Group - Pick every unit in GetKnocked and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by -3.00 towards (Angle from (Position of (Picked unit)) to GetCastP) degrees)
                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
        Wait 0.20 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) has buff Bankai ) Equal to True
            Then - Actions
                Unit Group - Pick every unit in (Units within 700.00 of (Center of (Playable map area)) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in GetKnocked) Equal to True))) and do (Actions)
                    Loop - Actions
                        Unit - Cause (Triggering unit) to damage (Picked unit), dealing 50000.00 damage of attack type Spells and damage type Normal
                        Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
            Else - Actions
                Unit Group - Pick every unit in (Units within 500.00 of (Center of (Playable map area)) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in GetKnocked) Equal to True))) and do (Actions)
                    Loop - Actions
                        Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                        Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
        Unit Group - Pick every unit in GetKnocked and do (Actions)
            Loop - Actions
                Unit Group - Remove (Picked unit) from GetKnocked
        Unit Group - Remove all units of GetKnocked from GetKnocked
        Unit - Remove Getuga Tenshou ! blue from (Last created unit)
        Unit - Remove Getuga Tenshou ! Black from (Last created unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Mien Dich (Neutral) for (Dying unit)) Equal to 1
            Then - Actions
                Unit - Change ownership of (Triggering unit) to Neutral Passive and Change color
            Else - Actions
        Custom script:   call RemoveLocation(udg_GetsugaPoint)
        Custom script:   call RemoveLocation(udg_GetCastP)

và cái này có 2 trigger

Mã:
Trigger 1:

    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Z Time Stop [Shana]
    Actions
        Sound - Play s2 <gen>
        Unit - Create 1 TimeSphere for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
        Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
        Unit Group - Add (Last created unit) to TimeSpheres
        Wait 1.00 seconds
        Sound - Play snd_fuzetsu_sound <gen>
        Unit Group - Pick every unit in TimeSpheres and do (Actions)
            Loop - Actions
                Unit - Order (Picked unit) to Human Dragonhawk Rider - Cloud (Position of (Last created unit))
                Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed

Trigger 2:

    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Time Stop ) Equal to True
                    Then - Actions
                        Unit - Set (Picked unit) movement speed to 0.00
                        Unit - Pause (Picked unit)
                        Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
                        Unit - Pause the expiration timer for (Picked unit)
                    Else - Actions
                        Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
                        Unit - Unpause (Picked unit)
                        Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
                        Unit - Unpause the expiration timer for (Picked unit)


Sẵn anh cho em hỏi cái spell Moon Glave của Naisha sao khi create new lại không có dòng nào cho chức năng của spell đó ,muốn sử dụng nó thì phải làm sao @.@
 
Mã:
Getsuga Tenshou
    Events
        Unit - A unit Begins casting an ability
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Ability being cast) Equal to Q Getsuga Tenshou 
                (Ability being cast) Equal to Q Getsuga Tenshou 
    Actions
        Sound - Play ic1 <gen>
        Set GetsugaPoint = (Target point of ability being cast)
        Set GetCastP = (Position of (Triggering unit))
        Wait 0.35 seconds
        Unit - Create 1 Footman for (Owner of (Triggering unit)) at [COLOR="#FF0000"][B](Position of (Triggering unit))[/B][/COLOR] facing Default building facing degrees
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) has buff Bankai ) Equal to False
            Then - Actions
                Unit - Add Getuga Tenshou ! blue to (Last created unit)
            Else - Actions
                Unit - Add Getuga Tenshou ! Black to (Last created unit)
        Unit - Add a 0.40 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm GetsugaPoint
        For each (Integer A) from 0 to 8, do (Actions)
            Loop - Actions
                Wait 0.01 seconds
                Unit Group - Pick every unit in (Units within 250.00 of [COLOR="#FF0000"][B](GetsugaPoint offset by (100.00 x (Real((Integer A)))) towards (Angle from GetCastP to GetsugaPoint) degrees)[/B][/COLOR] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching  and do (Actions)
                    Loop - Actions
                        Unit Group - Add (Picked unit) to GetKnocked
                        [COLOR="#FF0000"]Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl[/COLOR]
        Unit Group - Pick every unit in GetKnocked and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to [COLOR="#FF0000"][B]([U](Position of (Picked unit)[/U]) offset by -3.00 towards (Angle from ([U]Position of (Picked unit)[/U]) to GetCastP)[/B][/COLOR] degrees)
                [COLOR="#FF0000"]Special Effect - Create a special effect at [U](Position of (Picked unit))[/U] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl[/COLOR]
        Wait 0.20 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) has buff Bankai ) Equal to True
            Then - Actions
                [COLOR="#FF0000"]Unit Group - Pick every unit in (Units within 700.00 of ([U]Center of (Playable map area)[/U]) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in GetKnocked) Equal to True))) and do (Actions)[/COLOR]
                    Loop - Actions
                        Unit - Cause (Triggering unit) to damage (Picked unit), dealing 50000.00 damage of attack type Spells and damage type Normal
                        [COLOR="#FF0000"]Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl[/COLOR]
            Else - Actions
                [COLOR="#FF0000"]Unit Group - Pick every unit in (Units within 500.00 of ([U]Center of (Playable map area)[/U]) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in GetKnocked) Equal to True))) and do (Actions)[/COLOR]
                    Loop - Actions
                        Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                        [COLOR="#FF0000"]Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl[/COLOR]
        Unit Group - Pick every unit in GetKnocked and do (Actions)
            Loop - Actions
                Unit Group - Remove (Picked unit) from GetKnocked
        Unit Group - Remove all units of GetKnocked from GetKnocked
        Unit - Remove Getuga Tenshou ! blue from (Last created unit)
        Unit - Remove Getuga Tenshou ! Black from (Last created unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Mien Dich (Neutral) for (Dying unit)) Equal to 1
            Then - Actions
                Unit - Change ownership of (Triggering unit) to Neutral Passive and Change color
            Else - Actions
        Custom script:   call RemoveLocation(udg_GetsugaPoint)
        Custom script:   call RemoveLocation(udg_GetCastP)

và cái này có 2 trigger

Mã:
Trigger 1:

    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Z Time Stop [Shana]
    Actions
        Sound - Play s2 <gen>
        Unit - Create 1 TimeSphere for (Owner of (Casting unit)) at [COLOR="#FF0000"](Target point of ability being cast)[/COLOR] facing Default building facing degrees
        Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
        Unit Group - Add (Last created unit) to TimeSpheres
        Wait 1.00 seconds
        Sound - Play snd_fuzetsu_sound <gen>
        Unit Group - Pick every unit in TimeSpheres and do (Actions)
            Loop - Actions
                Unit - Order (Picked unit) to Human Dragonhawk Rider - Cloud [COLOR="#FF0000"](Position of (Last created unit))[/COLOR]
                Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed

Trigger 2:

    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        [COLOR="#FF0000"]Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)[/COLOR]
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Time Stop ) Equal to True
                    Then - Actions
                        Unit - Set (Picked unit) movement speed to 0.00
                        Unit - Pause (Picked unit)
                        Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
                        Unit - Pause the expiration timer for (Picked unit)
                    Else - Actions
                        Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
                        Unit - Unpause (Picked unit)
                        Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
                        Unit - Unpause the expiration timer for (Picked unit)

màu đỏ là leak, nếu leak trong leak thì cái leak ở trong được gạch chân
đỏ cả dòng "Unit Group - Pick every..." tức là leak group

> Sẵn anh cho em hỏi cái spell Moon Glave của Naisha sao khi create new lại không có dòng nào cho chức năng của spell đó ,muốn sử dụng nó thì phải làm sao @.@

cái đó phải sử dụng cả upgrade, xem unit Naisha và upgrade "Upgrade Moon Glaive"
 
Chỉnh sửa cuối:
Cho em hỏi nếu set group như thế này, sau đó destroy đi thì có leak ko?

Mã:
Set TempGroup = (Random 1 units from (Units within 100.00 of Casterpoint matching .....
 
Không, cái như mọi biến Group bt, xóa như cũ
 
Dưới đây là hệ thống ghép item do Tom_Kazansky làm rất dễ dùng

cách dùng:

- đánh dấu:
File \ Perferences \ Automatically create unknown variables while pasting trigger data

- copy thư mục: Recipe System
- sau khi copy xong thì vô trigger "GUIRecipeSystem Init" để "đăng kí" các recipe

- enjoy !
cách đăng kí:

-------- recipe của bạn --------
Set RS_RecipeCount = (RS_RecipeCount + 1)
Set RS_Item_1[RS_RecipeCount] = <item thành phần 1>
Set RS_Item_2[RS_RecipeCount] = <item thành phần 2>
Set RS_Item_3[RS_RecipeCount] = <item thành phần 3>
Set RS_Item_4[RS_RecipeCount] = <item thành phần 4>
Set RS_Item_5[RS_RecipeCount] = <item thành phần 5>
Set RS_Item_6[RS_RecipeCount] = <item thành phần 6>
Set RS_Item_Result[RS_RecipeCount] = <item sau khi ghép xong>
-------- đã đăng kí xong --------
chú ý: nếu thành phần nào không dùng thì phải đặt giá trị "NoItemType"
Attached Files
[System] Recipe System.rar‎ (48.1 KB, 738 views)
Last edited by Tom_Kazansky; 29-07-2009 at 08:56.

Trong trigger này muốn ghép item mà phải mất thêm một lượng tiền thì chỉnh sửa như nào vậy mọi người :D ?

Và nếu như nguyên liệu chưa đủ thì ko cho phép mua trực tiếp thì phải làm thế nào ?




À,tiện cho mình hỏi ví dụ muốn 1 item có hiệu ứng làm chậm ko stack thêm với hiệu ứng khác thì làm như nào ? Tương tự với skill.
 
Chỉnh sửa cuối:
Mọi người cho mình hỏi về custom map melee , mình muốn chỉnh cho AI có thể xây nhiều quân hơn thì vào phần nào :-?
Chẳng hạn Orc : Chẳng hạn insane thì xây hero + 2 shaman + 2 rider + 2 kodo + 3 taurent , bh mình muốn chỉnh mặc định cho tăng lên 3 taurent thành 5 taurent thì làm ntn ? ( Vẫn đủ food để xây nhé )
 
Mã:
Unit Group - Pick every unit in [COLOR="#008000"][B]GetKnocked[/B][/COLOR] and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by -3.00 towards (Angle from (Position of (Picked unit)) to GetCastP) degrees)
                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
        Wait 0.20 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) has buff Bankai ) Equal to True
            Then - Actions
                Unit Group - Pick every unit in[COLOR="#008000"][B] (Units within 700.00 of (Center of (Playable map area)) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in GetKnocked) Equal to True)))[/B][/COLOR] and do (Actions)

Àh a Tom ơi cái variable GetKnocked nó phải leak ko . Trong trigger có tới 2 phần Unit Group , 1 phần là xác nhận unit trong 1 phạm vi nào đó để add nó vào GetKnocked , phần còn lại là đẩy lùi các unit dc add trong GetKnocked .Vậy nếu bây h mình tóm gọn bằng cánh set GetKnocked = <phạm vi giống ở phần 1> rồi cho nó đẩy lùi luôn dc ko , chứ nếu như cách thông thường em không biết create cái variable nào phù hợp để destroy cả @.@ (có vài lần em thử nhưng Knocked ko xuất hiện khi cast spell )

---------- Post added at 22:18 ---------- Previous post was at 22:16 ----------

Mã:
Unit Group - Pick every unit in [COLOR="#008000"][B]GetKnocked[/B][/COLOR] and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by -3.00 towards (Angle from (Position of (Picked unit)) to GetCastP) degrees)
                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
        Wait 0.20 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) has buff Bankai ) Equal to True
            Then - Actions
                Unit Group - Pick every unit in[COLOR="#008000"][B] (Units within 700.00 of (Center of (Playable map area)) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in GetKnocked) Equal to True)))[/B][/COLOR] and do (Actions)

Àh a Tom ơi cái variable GetKnocked nó phải leak ko . Trong trigger có tới 2 phần Unit Group , 1 phần là xác nhận unit trong 1 phạm vi nào đó để add nó vào GetKnocked , phần còn lại là đẩy lùi các unit dc add trong GetKnocked .Vậy nếu bây h mình tóm gọn bằng cánh set GetKnocked = <phạm vi giống ở phần 1> rồi cho nó đẩy lùi luôn dc ko , chứ nếu như cách thông thường em không biết create cái variable nào phù hợp để destroy cả @.@ (có vài lần em thử nhưng Knocked ko xuất hiện khi cast spell :(( )

---------- Post added at 22:20 ---------- Previous post was at 22:18 ----------

edit: chết, lag nên gửi 2 bài giống nhau , mod sửa giúp em @.@
 
Cái GetKnocked thì không leak, còn cái dòng xanh dưới thì nó leak
P.S: Đẩy pick unit trong AOE phạm vi, ng` ta dùng MUI cho tiện, làm thế này loạn cả mắt lên :|
 
Ai trả lời giúp câu hỏi trên với :( mình làm map sắp xong đang bí chỗ đó
 
anh tom chỉ em làm sao để xài nhiều loại terrain được không , hôm qua có xem qua cái map gì đấy bên topic terrain anh gửi thấy nó xài nhiều terrain thế mà không biết làm thế nào
 
Cái đó thì bạn mở newgen lên trên thanh menu click vào Extensions -> Edit Tileset -> chọn terrain mà bạn muốn sau đó ấn ok,nó sẽ tự save lại,sau đó ko cần save lại nữa,out ra mở lại newgen -> bật map và dùng.
Nếu lúc add terrain có báo lỗi thì chịu khó add lại đến khi hết báo lỗi thì thôi
 
Trong trigger này muốn ghép item mà phải mất thêm một lượng tiền thì chỉnh sửa như nào vậy mọi người :D ?

Và nếu như nguyên liệu chưa đủ thì ko cho phép mua trực tiếp thì phải làm thế nào ?




À,tiện cho mình hỏi ví dụ muốn 1 item có hiệu ứng làm chậm ko stack thêm với hiệu ứng khác thì làm như nào ? Tương tự với skill.
làm thêm cái cái Item công thức :)
cái này mình chưa thử nhưng ý tưởng là thế này , tạo một item dạng Tome(sách) rồi add vào shop , làm trigger khi mình mua item này , nếu trong inventory đủ các thứ cần thiết rồi thì tạo 1 item cần bán rồi add cho unit đó và trừ tiền , còn ko thì do nothing hoặc tạo cái text là chưa đủ item cho hay :)
hiệu ứng làm chậm là sao , ý bạn là cái buff Slow và ko muốn nó bị slow dồn chăng :-? , dùng chung buff thì nó sẽ ko bị slow dồn nữa
vd : ThunderClap vs Cripple dùng chung 1 buff thì khi cast cả 2 skill này thì quái chỉ bị 1 buff Slow
 
Chỉnh sửa cuối:
À,ý mình là chẳng hạn trên người có đồ làm chậm như Orb Frost rồi,nếu cầm thềm item có hiệu ứng khác (như Poison chẳng hạn) thì chỉ một trong 2 món có tác dụng chứ cả hai ko cùng tác dụng ấy.

Cám ơn bạn đã chỉ,nhưng cụ thể mình làm thêm cái Item công thức như nào ? Vui lòng giúp mình với :D
 
Status
Không mở trả lời sau này.
Back
Top