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

Status
Không mở trả lời sau này.
Mã:
(Item-type of (Item being manipulated)) Equal to {[B]Item name[/B]}
mình tạo ra nhiều loại kiếm khác nhau mà cái này chỉ có đồ giống hệt nhau mới Drop thôi thì phải
 
lệnh random cho hero tavern nè , nhớ post rồi mà ta :|
Mã:
Events
    Player - Player 1 (Red) types a chat message containing -random as An exact match
    Player - Player 2 (Blue) types a chat message containing -random as An exact match
    Player - Player 3 (Teal) types a chat message containing -random as An exact match
    Player - Player 4 (Purple) types a chat message containing -random as An exact match
    Player - Player 5 (Yellow) types a chat message containing -random as An exact match
    Player - Player 6 (Orange) types a chat message containing -random as An exact match
Conditions
    (Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 0
Actions
    Set Random_Hero = (Random integer number between 1 and Random_Count)
    Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
    Game - Display to (All players) the text: (A player has randomed  + (Name of (Last created unit)))
    Selection - Select (Last created unit) for (Owner of (Last created unit))
    Player - Add -425 to (Triggering player) Current gold
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            Player - Make (Unit-type of (Last created unit)) Unavailable for training/construction by (Picked player)
    Set Random_Data[Random_Hero] = Random_Count
    Set Random_Count = (Random_Count - 1)
 
Mã:
Điều thứ 2

Code:
Events
        Player - Player 1 (Red) types a chat message containing -rg as An exact match
        
    Conditions
    Actions
        Game - Display to (All players) the text: Lenh -rg da duoc ki...
        Trigger - Turn off Tao NV sau 10s <gen>
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) slot status) Equal to Is playing
                    Then - Actions
                        Set Random_Hero = (Random integer number between 1 and Random_Count)
                        Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
                        Selection - Select (Last created unit) for (Owner of (Last created unit))
                        Game - Display to (All players) the text: (Co nguoi da chon  + (Name of (Last created unit)))
                        Set Random_Data[Random_Hero] = Random_Count
                        Set Random_Count = (Random_Count - 1)
                    Else - Actions
                        Do nothing
        Trigger - Turn off (This trigger)Sao lại dùng rồi mới đặt
đã thử lại set truớc mà vẫn vậy bạn thử tét hộ mình xem
.
___________Auto Merge________________

.
mình đã thử rồi mà sao vẫn ko đc
Mã:
StackChargedItem
    Events
        Unit - A unit Acquires an item
    Conditions
        And - All (Conditions) are true
            Conditions
                (Item-type of TempItem2) Equal to (Item-type of TempItem)
                TempItem2 Not equal to TempItem
        (Charges remaining in (Item being manipulated)) Greater than 0
    Actions
        Set TempUnit2 = (Hero manipulating item)
        Set TempItem = (Item being manipulated)
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Set TempItem2 = (Item carried by TempUnit in slot (Integer A))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                    Then - Actions
                        Item - Set charges remaining in TempItem2 to ((Charges remaining in TempItem2) + (Charges remaining in TempItem))
                        Item - Remove TempItem
                        Skip remaining actions
                    Else - Actions

???
Mã:
StackChargedItem
    Events
        Unit - A unit Acquires an item
    Conditions
        And - All (Conditions) are true
            Conditions
                (Item-type of TempItem2) Equal to (Item-type of TempItem)
                TempItem2 Not equal to TempItem
        (Charges remaining in (Item being manipulated)) Greater than 0
    Actions
        Set TempUnit2 = (Hero manipulating item)
        Set TempItem = (Item being manipulated)
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Set TempItem2 = (Item carried by TempUnit in slot (Integer A))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            [SIZE="4"][B]Conditions[/B][/SIZE]
                    Then - Actions
                        Item - Set charges remaining in TempItem2 to ((Charges remaining in TempItem2) + (Charges remaining in TempItem))
                        Item - Remove TempItem
                        Skip remaining actions
                    Else - Actions

Hai cai kiem tra dau,bảo nhét vào dưới lệnh này mà :|
 
lệnh random cho hero tavern nè , nhớ post rồi mà ta :|
Mã:
Events
    Player - Player 1 (Red) types a chat message containing -random as An exact match
    Player - Player 2 (Blue) types a chat message containing -random as An exact match
    Player - Player 3 (Teal) types a chat message containing -random as An exact match
    Player - Player 4 (Purple) types a chat message containing -random as An exact match
    Player - Player 5 (Yellow) types a chat message containing -random as An exact match
    Player - Player 6 (Orange) types a chat message containing -random as An exact match
Conditions
    (Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 0
Actions
    Set Random_Hero = (Random integer number between 1 and Random_Count)
    Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
    Game - Display to (All players) the text: (A player has randomed  + (Name of (Last created unit)))
    Selection - Select (Last created unit) for (Owner of (Last created unit))
    Player - Add -425 to (Triggering player) Current gold
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            Player - Make (Unit-type of (Last created unit)) Unavailable for training/construction by (Picked player)
    Set Random_Data[Random_Hero] = Random_Count
    Set Random_Count = (Random_Count - 1)

mình muốn host chỉnh random thôi chứ không phải ai thích random ko thì thôi nếu thế mình làm đc
 
Mã:
(Item-type of (Item being manipulated)) Equal to {[B]Item name[/B]}
mình tạo ra nhiều loại kiếm khác nhau mà cái này chỉ có đồ giống hệt nhau mới Drop thôi thì phải

À uhwfm nhầm.Nhưng mà đối v Drop item còn một cách khác nữa nhưng thôi ông thích thì dùng loop cũng ddc :X
----------------------------
Muốn làm random hero thì không dùng cách đó được.Phải có cách khác ..Thui hỏi mấy a pro đi ngại làm lắm ..Híc híc :((
 
Mã:
StackChargedItem
    Events
        Unit - A unit Acquires an item
    Conditions
        (Charges remaining in (Item being manipulated)) Greater than 0
    Actions
        Set TempUnit2 = (Hero manipulating item)
        Set TempItem = (Item being manipulated)
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Set TempItem2 = (Item carried by TempUnit in slot (Integer A))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                TempItem2 Not equal to TempItem
                                (Item-type of TempItem2) Equal to (Item-type of TempItem)
                    Then - Actions
                        Item - Set charges remaining in TempItem2 to ((Charges remaining in TempItem2) + (Charges remaining in TempItem))
                        Item - Remove TempItem
                        Skip remaining actions
                    Else - Actions
như cậy đúng chưa nhưng mà vẫn không đc hixhix
 
Mã:
StackChargedItem
    Events
        Unit - A unit Acquires an item
    Conditions
        (Charges remaining in (Item being manipulated)) Greater than 0
    Actions[B]
        Set TempUnit2 = (Hero manipulating item)[/B]
        Set TempItem = (Item being manipulated)
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Set TempItem2 = (Item carried by [B]TempUnit[/B] in slot (Integer A))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                TempItem2 Not equal to TempItem
                                (Item-type of TempItem2) Equal to (Item-type of TempItem)
                    Then - Actions
                        Item - Set charges remaining in TempItem2 to ((Charges remaining in TempItem2) + (Charges remaining in TempItem))
                        Item - Remove TempItem
                        Skip remaining actions
                    Else - Actions
như cậy đúng chưa nhưng mà vẫn không đc hixhix


Trên là TempUnit2 sao dưới lại là TempUnit :-/?
 
Mã:
Cam 1 vk
    Events
        Unit - A unit Acquires an item
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Item-class of (Item being manipulated)) Equal to Permanent
                (Item-class of (Item being manipulated)) Equal to Artifact
                (Item-class of (Item being manipulated)) Equal to Purchasable
                (Item-class of (Item being manipulated)) Equal to Miscellaneous
                (Item-class of (Item being manipulated)) Equal to Campaign
                (Item-class of (Item being manipulated)) Equal to Powerup
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
                        (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
                    Then - Actions
                        Hero - Drop (Item being manipulated) from (Hero manipulating item)
                        Game - Display to (All players) the text: (Name of (Rally-Point of (Triggering unit) as a destructible))
                    Else - Actions
hjx làm thế này không đc thì làm sao chỉ mình với trong mục Miscellaneous mình có 23 món khác nhau riêng phần này bị à Item trong mục khác thì chỉ cầm đc 1
Mã:
lenh rg
    Events
        Player - Player 1 (Red) types a chat message containing -rg as An exact match
        Player - Player 6 (Orange) types a chat message containing -rg as An exact match
    Conditions
    Actions
        Game - Display to (All players) the text: Lenh -rg da duoc ki...
        Trigger - Turn off Tao NV sau 10s <gen>
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) slot status) Equal to Is playing
                    Then - Actions
                        Set Random_Data[Random_Hero] = Random_Count
                        Set Random_Hero = (Random integer number between 1 and Random_Count)
                        Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
                        Selection - Select (Last created unit) for (Owner of (Last created unit))
                        Game - Display to (All players) the text: (Co nguoi da chon duoc + (Name of (Last created unit)))
                        Set Random_Count = (Random_Count - 1)
                    Else - Actions
                        Do nothing
        Trigger - Turn off (This trigger)
còn -rg làm sao vậy bạn
.
___________Auto Merge________________

.
Thanks nha phần StackChargedItem đã làm đc đúng như game_war nói
mà hỏi hoài có sao ko vậy
 
Mã:
Còn về Neutral Creep: tôi có 3 Region để spawn, cứ 60s, kiểm tra unit trong các region này (tất nhiên owner là Neutral Hostile) nếu ko có unit nào thì spawn random số lượng và unit type (NeutralSpawn[0 -> 9] <- unit type nhá). Nhg thế này thì "random" quá, chuẩn hơn, bạn nên có 1 sự sắp xếp unit sẽ spawn ra, tạm gọi là unit-pool. 
Ví dụ:
unit-pool 1 là 2 NeutralSpawn[0] và 1 NeutralSpawn[1]
unit-pool 2 là 3 NeutralSpawn[1]
unit-pool 3 là 2 NeutralSpawn[2] và 1 NeutralSpawn[3]
...

Khi spawn, tức là số unit trong region đó = 0 thì random 1 integer, integer này là bao nhiêu thì tiến hanh spawn theo cái pool mà bạn đã xác định sẵn ở trên.
ông Tom chỉ phần Spaw này khó hiểu quá (có lẽ tại mình ngu)
ai có thể huớng dẫn bằng trigger hay demo đuợc không
 
Mã:
Còn về Neutral Creep: tôi có 3 Region để spawn, cứ 60s, kiểm tra unit trong các region này (tất nhiên owner là Neutral Hostile) nếu ko có unit nào thì spawn random số lượng và unit type (NeutralSpawn[0 -> 9] <- unit type nhá). Nhg thế này thì "random" quá, chuẩn hơn, bạn nên có 1 sự sắp xếp unit sẽ spawn ra, tạm gọi là unit-pool. 
Ví dụ:
unit-pool 1 là 2 NeutralSpawn[0] và 1 NeutralSpawn[1]
unit-pool 2 là 3 NeutralSpawn[1]
unit-pool 3 là 2 NeutralSpawn[2] và 1 NeutralSpawn[3]
...

Khi spawn, tức là số unit trong region đó = 0 thì random 1 integer, integer này là bao nhiêu thì tiến hanh spawn theo cái pool mà bạn đã xác định sẵn ở trên.
ông Tom chỉ phần Spaw này khó hiểu quá (có lẽ tại mình ngu)
ai có thể huớng dẫn bằng trigger hay demo đuợc không

UnitSpawn Demo to đùng ở phía dưới mà không tháy à :-?..Cận rồi à đi đo kính đi #:-s
 
Mấy anh ơi cho em hỏi ,em làm Icon cho nhân vật em import đủ cả 2 file button và disabled ,vậy sao vô game hiện cái button ,đến lúc chết nó lại hiện thành màu xanh lá thay vì cái Icon disabled ,vậy em phải làm sao .
 
Bạn xem lại đường dẫn cho chính xác:
-Icon bình thường: ReplaceableTextures\CommandButtons\BTNtên.BLP
-Icon disable: ReplaceableTextures\CommandButtonsDisabled\DISBTNtên.BLP
 
cái này Spaw random mà mình muốn hỏi Spaw mỗi region là 1 loại quái thôi

Ai pảo spawm random..Không chịu đọc hiểu sao? ..Đây là spawn quái ở nơi đã được sinh ra(Nơi mà nó được vẽ ngay từ đầu ấy /:) )
 
Mã:
Cam 1 vk
    Events
        Unit - A unit Acquires an item
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Item-class of (Item being manipulated)) Equal to Permanent
                (Item-class of (Item being manipulated)) Equal to Artifact
                (Item-class of (Item being manipulated)) Equal to Purchasable
                (Item-class of (Item being manipulated)) Equal to Miscellaneous
                (Item-class of (Item being manipulated)) Equal to Campaign
                (Item-class of (Item being manipulated)) Equal to Powerup
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
                        (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
                    Then - Actions
                        Hero - Drop (Item being manipulated) from (Hero manipulating item)
                        Game - Display to (All players) the text: (Name of (Rally-Point of (Triggering unit) as a destructible))
                    Else - Actions
hjx làm thế này không đc thì làm sao chỉ mình với trong mục Miscellaneous mình có 23 món khác nhau riêng phần này bị à Item trong mục khác thì chỉ cầm đc 1
Mã:
lenh rg
    Events
        Player - Player 1 (Red) types a chat message containing -rg as An exact match
        Player - Player 6 (Orange) types a chat message containing -rg as An exact match
    Conditions
    Actions
        Game - Display to (All players) the text: Lenh -rg da duoc ki...
        Trigger - Turn off Tao NV sau 10s <gen>
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) slot status) Equal to Is playing
                    Then - Actions
                        Set Random_Data[Random_Hero] = Random_Count
                        Set Random_Hero = (Random integer number between 1 and Random_Count)
                        Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
                        Selection - Select (Last created unit) for (Owner of (Last created unit))
                        Game - Display to (All players) the text: (Co nguoi da chon duoc + (Name of (Last created unit)))
                        Set Random_Count = (Random_Count - 1)
                    Else - Actions
                        Do nothing
        Trigger - Turn off (This trigger)

Ai có thể hướng dẫn cho mình chi tiết về 2 vấn đề này không
thêm phần Battle Arena (30' là tất cả move về 1 điểm đánh nhau, bên nào kill hếtbe6n đó win và move ra lại) nữa nha, mình cho 30' vào đc nhưng mà đánh xong không biết ra b-(
 
hjx đang học trong lớp không có WE đc thì chỉ mình làm đi
 
Chịu, kô có trigger thì cũng pó tay. Nhưng theo cách làm là Pick hết tất cả Unit trong đấu trường đấy rồi move nó về point cũ.
 
@GW :ý của bạn ấy là đòi demo map cơ ;))
@Hacker : demo map move hero vào 1 vùng và move ra theo timer
tiện làm cái % rớt random item theo type unit
lưu ý : array tớ để = 2 tương ứng cậu làm cái cái timer cùng lúc như thế đc , còn muốn 3 cái hay 4 cái thì để array tương ứng , 100 cũng đc nhg lag map tớ hok chịu trách nhiệm :)
@Tom : anh tung cái nài vào post tổng hợp hướng dẫn hộ e nhé :)
ps : sặc hok upload đc file 8-}
 
@GW :ý của bạn ấy là đòi demo map cơ ;))
@Hacker : demo map move hero vào 1 vùng và move ra theo timer
tiện làm cái % rớt random item theo type unit
lưu ý : array tớ để = 2 tương ứng cậu làm cái cái timer cùng lúc như thế đc , còn muốn 3 cái hay 4 cái thì để array tương ứng , 100 cũng đc nhg lag map tớ hok chịu trách nhiệm :)
@Tom : anh tung cái nài vào post tổng hợp hướng dẫn hộ e nhé :)
ps : sặc hok upload đc file 8-}

Việc gì phải như thế, bạn ấy chỉ bí phần move về vị trí cũ chứ có bí khúc đầu + giữa đâu mà:-".

Mã:
Cam 1 vk
    Events
        Unit - A unit Acquires an item
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Item-class of (Item being manipulated)) Equal to Permanent
                (Item-class of (Item being manipulated)) Equal to Artifact
                (Item-class of (Item being manipulated)) Equal to Purchasable
                (Item-class of (Item being manipulated)) Equal to Miscellaneous
                (Item-class of (Item being manipulated)) Equal to Campaign
                (Item-class of (Item being manipulated)) Equal to Powerup
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
                        (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
                    Then - Actions
                        Hero - Drop (Item being manipulated) from (Hero manipulating item)
                        Game - Display to (All players) the text: (Name of (Rally-Point of (Triggering unit) as a destructible))
                    Else - Actions

Có 6 slots thôi đào đâu ra 10 slots mà làm thế này hả?:-/
Mã:
For each (Integer A) from 1 to 10, do (Actions)

P/s: Sever GVN bị điên hay sao mấy hôm nay kô upload đc file, kô thấy TB gì cả=((.
 
Status
Không mở trả lời sau này.
Back
Top