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

Cho em hỏi làm thế nào để building tự sử dụng skill Chủ động mà mình ko cần click. Nghĩa là khi nó đủ số Mana cho phép (VD: Building đó 15 mana và skill đó cần 15 mana để sử dụng thì khi Building đạt 15 mana nó sẽ tự động sử dụng vào đối thủ)
 
Ai giúp em với :(( ...............

Mã:
Cast
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) is A structure) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Mana of (Attacking unit)) Greater than or equal to 120.00
            Then - Actions
                Unit - Order (Attacking unit) to Orc Far Seer - Chain Lightning (Attacked unit)
            Else - Actions
 
E làm skill dạng sao chổi bay xuống rùi tun + dam. Lúc em làm skill ko wait 2s thì sài ngon ơ. Wait 2s thì chã thấy gì hết. E dùng time. Action coundown timer - stars Comet_time as a one shoot... 2 secounds Sau đó tạo trigger mới.e chỉnh Event time Comet_Time expries. rùi mấy dòng sau thì action. sao nó vẫn ko đc vậy :((
Thanks nhìu
 
E làm skill dạng sao chổi bay xuống rùi tun + dam. Lúc em làm skill ko wait 2s thì sài ngon ơ. Wait 2s thì chã thấy gì hết. E dùng time. Action coundown timer - stars Comet_time as a one shoot... 2 secounds Sau đó tạo trigger mới.e chỉnh Event time Comet_Time expries. rùi mấy dòng sau thì action. sao nó vẫn ko đc vậy :((
Thanks nhìu
cho coi trigger di bạn, chứ bạn nói vậy khó hiểu lắm..................................
 
^ Hehe thankyou mình sữa được rùi :D
-Cho mình hỏi tý. Map mình làm pick hero double click. Mình muốn làm như sau VD:
Pick hero A thì trong shop bán Item A+, tương tự nếu pick hero B thì shop bán Item B+
Nếu ko pick hero A hay B thì trong shop không bán Item A+ hay B+
Tức là lúc đầu game shop đó ko bán item gì hết. Làm sao để add item tương ứng vs mỗi hero mà ng` chơi pick :2cool_sad:
-Hỏi thêm làm sao để hero không thể mua item đã chỉ định(1) ?
-Bonus hỏi thêm Hero khi mua item đã chỉ định(2) thì remove item đó ra khỏi ngừơi lun. Và xóa item đã bán trong shop đó lun, tất cả mọi shop trong map nhé.
Thank you nhá, 1 trong 3 cũng đc :6cool_smile:
 
1.
Mã:
Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        Set UnitTypeArray[TempInt] = Footman
        Set ItemTypeArray[TempInt] = Claws of Attack +15
        Set Item[TempInt] = Orb of Frost
        Set TempInt = (TempInt + 1)
        Set UnitTypeArray[TempInt] = Blood Mage
        Set ItemTypeArray[TempInt] = Claws of Attack +15
        Set Item[TempInt] = Orb of Slow
        Set TempInt = (TempInt + 1)
        Set UnitTypeArray[TempInt] = Kael
        Set ItemTypeArray[TempInt] = Claws of Attack +15
        Set Item[TempInt] = Orb of Darkness
        Set TempInt = (TempInt + 1)

Mã:
Untitled Trigger 005
    Events
        Unit - A unit Sells an item (from shop)
    Conditions
    Actions
        For each (Integer A) from 1 to TempInt, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-type of (Sold Item)) Equal to ItemTypeArray[(Integer A)]
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Unit-type of (Buying unit)) Equal to UnitTypeArray[(Integer A)]
                            Then - Actions
                                Hero - Create Item[(Integer A)] and give it to (Buying unit)
                            Else - Actions
                    Else - Actions
2.
3.Đầu tiên bạn phải add item cần bán cho các shop bằng lệnh,ví dụ ở đây là Tome of Experience
Mã:
Neutral Building - Add Tome of Experience to all marketplaces with 1 in stock and a max stock of 1
Sau đó khi một unit mua item đó thành công thì bạn dùng lệnh
Mã:
Neutral Building - Remove Tome of Experience from all marketplaces
Theo kinh nghiệm của mình thì dù đặt stock và max stock là bao nhiêu thì mua một lần là nó tự biến mất khỏi shop rồi
 
1.
Mã:
Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        Set UnitTypeArray[TempInt] = Footman
        Set ItemTypeArray[TempInt] = Claws of Attack +15
        Set Item[TempInt] = Orb of Frost
        Set TempInt = (TempInt + 1)
        Set UnitTypeArray[TempInt] = Blood Mage
        Set ItemTypeArray[TempInt] = Claws of Attack +15
        Set Item[TempInt] = Orb of Slow
        Set TempInt = (TempInt + 1)
        Set UnitTypeArray[TempInt] = Kael
        Set ItemTypeArray[TempInt] = Claws of Attack +15
        Set Item[TempInt] = Orb of Darkness
        Set TempInt = (TempInt + 1)

Mã:
Untitled Trigger 005
    Events
        Unit - A unit Sells an item (from shop)
    Conditions
    Actions
        For each (Integer A) from 1 to TempInt, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-type of (Sold Item)) Equal to ItemTypeArray[(Integer A)]
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Unit-type of (Buying unit)) Equal to UnitTypeArray[(Integer A)]
                            Then - Actions
                                Hero - Create Item[(Integer A)] and give it to (Buying unit)
                            Else - Actions
                    Else - Actions
2.
3.Đầu tiên bạn phải add item cần bán cho các shop bằng lệnh,ví dụ ở đây là Tome of Experience
Mã:
Neutral Building - Add Tome of Experience to all marketplaces with 1 in stock and a max stock of 1
Sau đó khi một unit mua item đó thành công thì bạn dùng lệnh
Mã:
Neutral Building - Remove Tome of Experience from all marketplaces
Theo kinh nghiệm của mình thì dù đặt stock và max stock là bao nhiêu thì mua một lần là nó tự biến mất khỏi shop rồi

sao ko có hàm var vậy bạn :8cool_rap:
 
bạn Tom ơi làm cho mình 1 map demo event búa lùn trong map X Hero Siege với , 10 player tham gia nha sự kiện nha chứ ko giống như map X hero siege có 8 player .
 
cho mình hỏi khi slide unit làm thế nào để khi slide vào góc của map, unit đó không bị trượt ra ngoài map, mà di chuyển lên xuống dọc theo góc map (giống như trong DotA) ?
 
Hỏi:

1.Tạo nhiều library có ảnh hưởng tới thời gian loading map không ?
2.Cũng như câu hỏi của bạn khoai_so ở trên
 
cho mình hỏi tiếp, mình tạo được map rồi, tạo một unit cho player 1, mà nó lại ra màu xanh của player 2 là sao thế nhỉ (trong worldeditor đặt thử một unit vào map thì nó màu đỏ thì đúng), ai chỉ dùm với
thk!
Cho Quote lại, ai giúp mình với
 
Làm sao để màu của Player là cố định, không được đổi màu trong khi chuẩn bị vào game nhỉ?
 
YAN[asian];22749386 nói:
Làm sao để màu của Player là cố định, không được đổi màu trong khi chuẩn bị vào game nhỉ?

Mã:
Player - Set (Player x) color to [abc]
Cho dù player có chỉnh ở ngoài thì khi vào game player x sẽ là màu [abc]
 
Hỏi:

1.Tạo nhiều library có ảnh hưởng tới thời gian loading map không ?
2.Cũng như câu hỏi của bạn khoai_so ở trên

1, không chỉ ảnh hưởng thời gian save map và con đó số chỉ là mini giây
2, sử dụng BoundSentinel và sử dụng trình hàm GetPPX và GetPPY

Mã:
    function GetPPX takes real x, real dist, real angle returns real
        local real X = x + dist * Cos(angle * bj_DEGTORAD)
        if X < MinX then
            return MinX
        endif
        if X > MaxX then
            return MaxX
        endif
        return X
    endfunction
        //=========================================================================================
    function GetPPY takes real y, real dist, real angle returns real
        local real Y = y + dist * Sin(angle * bj_DEGTORAD)
        if Y < MinY then
            return MinY
        endif
        if Y > MaxY then
            return MaxY
        endif
        return Y
    endfunction
 
1, không chỉ ảnh hưởng thời gian save map và con đó số chỉ là mini giây
2, sử dụng BoundSentinel và sử dụng trình hàm GetPPX và GetPPY

Mã:
    function GetPPX takes real x, real dist, real angle returns real
        local real X = x + dist * Cos(angle * bj_DEGTORAD)
        if X < MinX then
            return MinX
        endif
        if X > MaxX then
            return MaxX
        endif
        return X
    endfunction
        //=========================================================================================
    function GetPPY takes real y, real dist, real angle returns real
        local real Y = y + dist * Sin(angle * bj_DEGTORAD)
        if Y < MinY then
            return MinY
        endif
        if Y > MaxY then
            return MaxY
        endif
        return Y
    endfunction

Sử dụng như nào vậy dh-g :x ?
 
Mã:
Player - Set (Player x) color to [abc]
Cho dù player có chỉnh ở ngoài thì khi vào game player x sẽ là màu [abc]

Vậy có cách nào để kể cả ở ngoài cũng ko chỉnh đc ko? Như map Dota hay nhiều map khác, khi trong "phòng chờ" thì ko click vào màu để đổi đc ấy.
 
Back
Top