Topic hỏi đáp (tập 5) về cách làm map

Status
Không mở trả lời sau này.
em mún làm 1 cái item , cho em hỏi triggle này đúng hôk với
Mã:
Ngan hang
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) has an item of type Ngân hàng BIDV) Equal to True
    Actions
        Trigger - Turn on  Player 1 <gen>

Mã:
 Player 1
    Events
        Time - Every 0.05 seconds of game time
    Conditions
    Actions
        Player - Add 1 to Player 1 (Red) Current gold
 
cái đó sẽ có trục trặc khi drop item =))
fix :
Mã:
    Events
        Time - Every 0.05 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching (((Triggering unit) has (Item carried by (Triggering unit) of type [B]Item[/B])) Equal to True)) and do (Actions)
            Loop - Actions
                Player - Add [B]money[/B] to (Owner of (Picked unit)) Current gold
 
bạn nói sử dụng phải có 5 bình máu mà. Còn 4 cái không sài được là tất nhiên, phải 5 mới được. Mà muốn lên cấp phải sài 5 lần, nghĩa là phải 10 bình mới được lên cấp
______________________________________

Kĩ niệm bài viết thứ 100 :D


tôi ghi 5 bình là vd thôi chứ nhiêu bình chả đc
khi không có bình máu thì skill không đc chứ không giới hạn
mà skill avatar không thấy có tác dụng gì cả
 
chỉ em cách làm mấy cái bỏ tiền ra mua được gỗ với
 
cơ bản warcraft có rui
trong phần power up thì phải >:D<
 
1/ Cho hỏi cách xài mấy cái Xe system trong Jass, cách turn on, turn off trigger trong Jass.
2/ Cho hỏi cách làm trigger Take Damage trong Jass vì trong GUI dạng trigger kiểu này cần 2 trigger nhưng trong Jass mỗi Spell, system,... chỉ dùng 1 trigger.
Ai trả lời giúp cái này và thêm 2 câu nữa:
1/ Trong tutorial [Basic of Struct] của anh Tom thì anh Tom có hướng dẫn làm spell knock back trong Jass, yêu cầu có 2 system là CSSafety và cái system Timer vậy cho hỏi cái system CSsafety có công dụng gì (hình như cái này cũ rồi phải dùng cái system mới).
2/ Em xem trên thehelper.net, những spell Jass thường khai báo biến với từ khóa private, constant
Mã:
[U][B]private[/B][/U] [U][B]constant[/B][/U] integer SpellAID = 'A000' // ví dụ
Vậy công dụng của 2 từ này là gì ??
 
ai có cách nào mà học ability wa item dễ hôk , sáng h em mò theo cách làm của anh game_war mà không được , hix
 
ai có cách nào mà học ability wa item dễ hôk , sáng h em mò theo cách làm của anh game_war mà không được , hix

cách gamewar = gui dễ hoc mà :| thay item zo là xong :| ko bít tạo item thì copy y hệt là xong
 
sao em làm hôk được zị , mới mua no biến mất tiu item lun mà hôk có skill @_@
Mã:
 Quay Tum lym
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Quay Tùm Lum
    Actions
        Set Units = (Triggering unit)
        Set Ability[(Player number of (Owner of Units))] = Quay tùm lum 
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Ability[(Player number of (Owner of Units))] for (Triggering unit)) Less than 1
            Then - Actions
                Unit - Add Ability[(Player number of (Owner of Units))] to (Triggering unit)
                Game - Display to (Player group((Owner of Units))) for 10.00 seconds the text: Ban da~ mua Skill Q...
            Else - Actions
                Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: Ban da~ Co Skill N...
 
Ai trả lời giúp cái này và thêm 2 câu nữa:
1/ Trong tutorial [Basic of Struct] của anh Tom thì anh Tom có hướng dẫn làm spell knock back trong Jass, yêu cầu có 2 system là CSSafety và cái system Timer vậy cho hỏi cái system CSsafety có công dụng gì (hình như cái này cũ rồi phải dùng cái system mới).
2/ Em xem trên thehelper.net, những spell Jass thường khai báo biến với từ khóa private, constant
Mã:
[U][B]private[/B][/U] [U][B]constant[/B][/U] integer SpellAID = 'A000' // ví dụ
Vậy công dụng của 2 từ này là gì ??

1/Mới học thì dùng TimerUtils thôi, đơn giản nhất.

2/Biến globals, nếu ở trong một scope/library thì có thể dùng private để biến này chỉ dùng đc trong scope/library đó (tránh bị nhầm lẫn nếu trùng tên). Constant làm cho biến này kô thể thay đổi giá trị.

----------

@Leoni: Thử send map demo xem. Có thấy lỗi nào đâu
Btw... Khi nào rảnh tớ sẽ edit lại cái tut đó, nhiều chỗ vẫn còn hơi khó hiểu.
 
Chỉnh sửa cuối:
sao em làm hôk được zị , mới mua no biến mất tiu item lun mà hôk có skill @_@
Mã:
 Quay Tum lym
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Quay Tùm Lum
    Actions
        Set Units = (Triggering unit)
        Set Ability[(Player number of (Owner of Units))] = Quay tùm lum 
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Ability[(Player number of (Owner of Units))] for (Triggering unit)) Less than 1
            Then - Actions
                Unit - Add Ability[(Player number of (Owner of Units))] to (Triggering unit)
                Game - Display to (Player group((Owner of Units))) for 10.00 seconds the text: Ban da~ mua Skill Q...
            Else - Actions
                Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: Ban da~ Co Skill N...
cái you nói chắc là powerup nên chưa kịp để trên người là nuốt mẹ rùi =))
kiểu này thi cho item(k phải powerup) trên người xong rùi remove cho an toan
 
Bước 1: Chuẩn bị Items
Trước hết, chúng ta sẽ tạo các Items tương ứng với mỗi Abilities (Lưu ý chỉ tạo các Custom Items này từ Class Items Power Up)


zị thì seo hẻ anh =.=
 
lấy cái áo hay cái khiên gì đó đổi hình
xong rùi dễ trên người
rùi kiểm tra skill đủ dk add ko :|
đủ thì add rùi remove item
 
tôi ghi 5 bình là vd thôi chứ nhiêu bình chả đc
khi không có bình máu thì skill không đc chứ không giới hạn
mà skill avatar không thấy có tác dụng gì cả
-Thành thật xin lỗi bạn, cái trigger Skill2 mình có 1 lỗi nhỏ là... quên condition :)
-Bạn sửa mấy chỗ in đậm lại là ổn:
Mã:
Skill2
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to (==) Avatar
    Actions
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                [B](Real((Charges remaining in (Item carried by (Casting unit) of type Potion of Greater Healing)))) Equal to (==) 0.00[/B]
            Then - Actions
                Unit - Order (Casting unit) to Stop
                Game - Display to (All players controlled by a ((Owner of (Triggering unit)) controller) player) the text: Phai co it nhat 1 P...
              [B]  Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 150.00)[/B]
            Else - Actions
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
           [B]     (Real((Charges remaining in (Item carried by (Casting unit) of type Potion of Greater Healing)))) Greater than or equal to (>=) 1.00[/B]
            Then - Actions
                Item - Set charges remaining in (Item carried by (Casting unit) of type Potion of Greater Healing) to ((Charges remaining in (Item carried by (Casting unit) of type Potion of Greater Healing)) - 1)
            Else - Actions
 
Mọi người cho em hỏi là nếu mình làm GUI thì có nhất thiết phải set biến unit = null không?
Và sao máy nhà em cứ test map = JNGP thì đều bị lỗi don't send vậy?
 
Em định làm mấy cái Dialog nhưng không hiểu sao mà vào game thì nó không hiện lên, mấy anh coi giùm em sai chỗ nào
Mã:
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Dialog - Change the title of Dialog_MD to Select hero
        Set Dialog_MD = (Clicked dialog)
        Dialog - Create a dialog button for Dialog_MD labelled Male
        Set Dialogbutton_BID[1] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog_MD labelled Female
        Set Dialogbutton_BID[2] = (Last created dialog Button)
        Dialog - Show Dialog_MD for Player 1 (Red)

Mã:
Button 1
    Events
        Dialog - A dialog button is clicked for Dialog_MD
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                (Clicked dialog button) Equal to Dialogbutton_BID[1]
            Then - Actions
                Unit - Create 1 Priest for Player 1 (Red) at (Center of 001 <gen>) facing Default building facing degrees
                Dialog - Clear Dialog_MD
            Else - Actions
                Dialog - Clear Dialog_MD

Mã:
Button 2
    Events
        Dialog - A dialog button is clicked for Dialog_MD
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                (Clicked dialog button) Equal to Dialogbutton_BID[2]
            Then - Actions
                Unit - Create 1 Sorceress for Player 1 (Red) at (Center of 001 <gen>) facing Default building facing degrees
                Dialog - Clear Dialog_MD
            Else - Actions
                Dialog - Clear Dialog_MD
Các biến gồm:
Dialog_Md: type dialog không array
Dialogbutton_BID: type dialog button (array 2)
 
khi tạo biến Dialog thì đã có một dialog được tạo trong biến đó rồi, chỉ dùng thôi không cần tạo hay set gì cả

Mã:
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Dialog - Change the title of Dialog_MD to Select hero
        [COLOR="Red"][B]Set Dialog_MD = (Clicked dialog)[/B][/COLOR]
        Dialog - Create a dialog button for Dialog_MD labelled Male
        Set Dialogbutton_BID[1] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog_MD labelled Female
        Set Dialogbutton_BID[2] = (Last created dialog Button)
        Dialog - Show Dialog_MD for Player 1 (Red)

dòng đỏ đó là thừa, ngoài ra, khi đặt giá trị (Clicked dialog), ở đây không có giá trị (Clicked dialog) nên sẽ trả về "null" (ko có dialog nào)
và biến Dialog_MD lúc này sẽ không có dialog nào -> tạo button, show đều ko có tác dụng

bỏ dòng đỏ đi
 
Em định làm mấy cái Dialog nhưng không hiểu sao mà vào game thì nó không hiện lên, mấy anh coi giùm em sai chỗ nào
Mã:
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Dialog - Change the title of Dialog_MD to Select hero
        Set Dialog_MD = (Clicked dialog)
        Dialog - Create a dialog button for Dialog_MD labelled Male
        Set Dialogbutton_BID[1] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog_MD labelled Female
        Set Dialogbutton_BID[2] = (Last created dialog Button)
        Dialog - Show Dialog_MD for Player 1 (Red)

Mã:
Button 1
    Events
        Dialog - A dialog button is clicked for Dialog_MD
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                (Clicked dialog button) Equal to Dialogbutton_BID[1]
            Then - Actions
                Unit - Create 1 Priest for Player 1 (Red) at (Center of 001 <gen>) facing Default building facing degrees
                Dialog - Clear Dialog_MD
            Else - Actions
                Dialog - Clear Dialog_MD

Mã:
Button 2
    Events
        Dialog - A dialog button is clicked for Dialog_MD
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                (Clicked dialog button) Equal to Dialogbutton_BID[2]
            Then - Actions
                Unit - Create 1 Sorceress for Player 1 (Red) at (Center of 001 <gen>) facing Default building facing degrees
                Dialog - Clear Dialog_MD
            Else - Actions
                Dialog - Clear Dialog_MD
Các biến gồm:
Dialog_Md: type dialog không array
Dialogbutton_BID: type dialog button (array 2)

Cách sửa thế này
Mã:
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Dialog – Clear Dialog_MD
        Dialog - Change the title of Dialog_MD to Select hero
        Dialog - Create a dialog button for Dialog_MD labelled Male
        Set Dialogbutton_BID[1] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog_MD labelled Female
        Set Dialogbutton_BID[2] = (Last created dialog Button)
        Dialog - Show Dialog_MD for Player 1 (Red)
Mã:
Button 1
    Events
        Dialog - A dialog button is clicked for Dialog_MD
    Conditions
        (Clicked dialog button) Equal to Dialogbutton_BID[1]
    Actions
        Unit - Create 1 Priest for Player 1 (Red) at (Center of 001 <gen>) facing Default building facing degrees
Cái sau cũng sửa giống cái này, nếu có gì không hiểu đừng hỏi mình, mình tìm thấy trong thehelper có 1 bài giống thế, chỉnh sửa lại 1 chút cho giống bài của bạn thôi.
 
Status
Không mở trả lời sau này.
Back
Top