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

Thảo luận trong 'World Editor' bắt đầu bởi Tom_Kazansky, 2/9/12.

  1. nguvuong12

    nguvuong12 Youtube Master Race

    Tham gia ngày:
    21/8/11
    Bài viết:
    3
    Giúp mình với mình muốn làm mỗi khi level hero mà chia hết cho 4 thì mới được 1 skill point thì làm sao vậy với lại nếu hero được lên ngay level nào đó ví dụ như là lên lv 72 thì 72/4 = 18 + với lv 1 có được 1 skill point thì hero đó được 19 skill point còn lv 74 thì cũng được 19 skill point vì không chia hết cho 4 đang cần người giúp gấp ^^ Tks nhiều nha.
     
  2. SITUVN

    SITUVN T.E.T.Я.I.S

    Tham gia ngày:
    6/11/09
    Bài viết:
    575
    Trừ điểm tự động cộng nếu cấp không chia hết cho 4.

    Mã:
    Mod 4
        Events
            Unit - A unit Gains a level
        Conditions
        Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    ((Hero level of (Triggering unit)) mod 4) Not equal to 0
                Then - Actions
                    Hero - Modify unspent skill points of (Triggering unit): Subtract 1 points
                Else - Actions
    
     
  3. nguvuong12

    nguvuong12 Youtube Master Race

    Tham gia ngày:
    21/8/11
    Bài viết:
    3
    Mình biết cách đó r nhưng mà lúc để cái Set Level To x thì nó lại k trừ points có cách naò khắc phục được không vậy ?
     
  4. langthangbairac

    langthangbairac T.E.T.Я.I.S

    Tham gia ngày:
    19/5/12
    Bài viết:
    594
    Nơi ở:
    Thanh Chương
    Bạn dùng 1 biến integer: Level_Cache với default value là 1
    --> Event: Unit gains lvl
    --> Action:
    Lấy level hiện tại trừ Level_Cache ---> Giá trị (gọi là X)

    Tiếp đó dùng ForLoop từ X đến Level Hiện tại, trong ForLoop bạn check xem nếu Var Loop chia hết cho 4 thì +1 skills point

    p/s : Max lvl hero phải nhỏ hơn 700 :)

    OK nhé :8cool_tire:
     
    Chỉnh sửa cuối: 24/7/14
  5. nguvuong12

    nguvuong12 Youtube Master Race

    Tham gia ngày:
    21/8/11
    Bài viết:
    3
    Làm dùm mình cái Demo được không mình còn new nên không hiểu gì mấy =.=
     
  6. SITUVN

    SITUVN T.E.T.Я.I.S

    Tham gia ngày:
    6/11/09
    Bài viết:
    575
    À, rồi, hiểu. Phỏng đoán thì cũng đâu có khó gì.

    Ý của @langthangbairac là
    Lấy số cấp hiện tại trừ số cấp trước đó rồi chạy vòng lặp để tìm số chia hết cho 4 rồi công thêm 1 điểm kĩ năng.
    Và nhớ lưu lại cấp của con tướng đó mỗi khi sự kiện A unit Gains a level xảy ra.
    Thay vì dùng 1 biến thì có thể dùng giá trị tùy khách của con tướng (Custom Value)

    Mã:
    Mod 4
        Events
            Unit - A unit Gains a level
        Conditions
        Actions
            // Giá trị chưa gán thì gán là 1 (cấp ban đầu của tướng)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Custom value of (Triggering unit)) Equal to 0
                Then - Actions
                    Unit - Set the custom value of (Triggering unit) to 1
                Else - Actions
            For each (Integer A) from ((Custom value of (Triggering unit)) + 1) to (Hero level of (Triggering unit)), do (Actions)
                Loop - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            ((Integer A) mod 4) Not equal to 0
                        Then - Actions
                            Hero - Modify unspent skill points of (Triggering unit): Subtract 1 points
                        Else - Actions
            Unit - Set the custom value of (Triggering unit) to (Hero level of (Triggering unit))
    
    Nhưng vẫn có lỗi.
     
    Chỉnh sửa cuối: 25/7/14
  7. langthangbairac

    langthangbairac T.E.T.Я.I.S

    Tham gia ngày:
    19/5/12
    Bài viết:
    594
    Nơi ở:
    Thanh Chương
    ^
    Lỗi phải gì?

    Bạn làm vậy nè: Tạo 3 biến integer Custom, Loop_Int, Level(3)

    Các trigger (theo Gui) gồm khoảng 3 trigger.
    2 trigger setup:
    Mã:
    Set Custom1
        Events
            Time - Elapsed game time is 0.00 seconds
        Conditions
        Actions
            Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
                Loop - Actions
                    Set Custom = (Custom + 1)
                    Unit - Set the custom value of (Picked unit) to Custom
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            ((Picked unit) is A Hero) Equal to True
                        Then - Actions
                            Set Level[Custom] = (Level of (Picked unit))
                        Else - Actions
    
    

    Mã:
    Set Custom2
        Events
            Unit - A unit enters (Playable map area)
        Conditions
        Actions
            Set Custom = (Custom + 1)
            Unit - Set the custom value of (Triggering unit) to Custom
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    ((Triggering unit) is A Hero) Equal to True
                Then - Actions
                    Set Level[Custom] = (Level of (Triggering unit))
                Else - Actions
    

    Trigger chính:

    Mã:
    Level Gains
        Events
            Unit - A unit Gains a level
        Conditions
        Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Level of (Triggering unit)) Greater than Level[(Custom value of (Triggering unit))]
                Then - Actions
                    For each (Integer Loop_Int) from (Level[(Custom value of (Triggering unit))] + 1) to (Level of (Triggering unit)), do (Actions)
                        Loop - Actions
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                If - Conditions
                                    (Loop_Int mod 4) Equal to 0
                                Then - Actions
                                    Hero - Modify unspent skill points of (Triggering unit): Add 1 points
                                Else - Actions
                                    Do nothing
                    Set Level[(Custom value of (Triggering unit))] = (Level of (Triggering unit))
                Else - Actions
     

    Các file đính kèm:

    • DM.rar
      Kích thước:
      16.4 KB
      Đọc:
      1
    Chỉnh sửa cuối: 25/7/14
  8. Evil_Hunter

    Evil_Hunter Mario & Luigi

    Tham gia ngày:
    18/9/11
    Bài viết:
    786
    Nơi ở:
    Evil Forest
    Mình có skill thế này, chả hiểu sao khi dùng thì đôi lúc con dummy nó chạy luôn, chứ trigger ko turn off :(. Mong mn xem hộ

    Mã:
    Ace E
        Events
            Unit - A unit Starts the effect of an ability
        Conditions
            (Ability being cast) Equal to Mera Mera no Dangan 
        Actions
            Set Ace_C[1] = (Casting unit)
            Set Ace_A[2] = (Facing of Ace_C[1])
            Set Ace_P[11] = (Position of Ace_C[1])
            Set Ace_P[12] = (Target point of ability being cast)
            Unit - Create 1 Dummy_Mera Mera no Dangan for (Owner of Ace_C[1]) at Ace_P[11] facing Ace_A[2] degrees
            Set Ace_D[1] = (Last created unit)
            Unit - Turn collision for Ace_D[1] Off
            Custom script:   call RemoveLocation(udg_Ace_P[11])
            Trigger - Turn on Ace E Loop <gen>
    
    Mã:
    Ace E Loop
        Events
            Time - Every 0.06 seconds of game time
        Conditions
        Actions
            Set Ace_P[11] = (Position of Ace_D[1])
            Set Ace_P[13] = (Ace_P[11] offset by 60.00 towards Ace_A[2] degrees)
            Unit - Move Ace_D[1] instantly to Ace_P[13]
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    Or - Any (Conditions) are true
                        Conditions
                            (Distance between Ace_P[13] and Ace_P[12]) Less than or equal to 100.00
                            (Terrain pathing at Ace_P[13] of type Walkability is off) Equal to True
                Then - Actions
                    Trigger - Turn off (This trigger)
                    Unit - Remove Ace_D[1] from the game
                    Special Effect - Create a special effect at Ace_P[11] using FireStomp.mdx
                    Special Effect - Destroy (Last created special effect)
                    Special Effect - Create a special effect at Ace_P[11] using NewMassiveEX.mdx
                    Special Effect - Destroy (Last created special effect)
                    Special Effect - Create a special effect at Ace_P[11] using NewGroundEX.mdx
                    Special Effect - Destroy (Last created special effect)
                    Special Effect - Create a special effect at Ace_P[11] using A-Bomb.mdx
                    Special Effect - Destroy (Last created special effect)
                    Set Ace_G[3] = (Units within 600.00 of Ace_P[12] matching ((((Matching unit) belongs to an enemy of Player 11 (Dark Green)) 
    Equal to True) and (((Matching unit) is alive) Equal to True)))
                    Unit Group - Pick every unit in Ace_G[3] and do (Actions)
                        Loop - Actions
                            Unit - Cause Ace_C[1] to damage (Picked unit), dealing ((Real((Level of Mera Mera no Dangan  
    for Ace_C[1]))) x (Real((Agility of Ace_C[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire
                            Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
                            Special Effect - Destroy (Last created special effect)
                    Custom script:   call RemoveLocation(udg_Ace_P[11])
                    Custom script:   call RemoveLocation(udg_Ace_P[12])
                    Custom script:   call RemoveLocation(udg_Ace_P[13])
                    Custom script:   call DestroyGroup(udg_Ace_G[3])
                Else - Actions
            Custom script:   call RemoveLocation(udg_Ace_P[11])
            Custom script:   call RemoveLocation(udg_Ace_P[13])
    
     
    Chỉnh sửa cuối: 29/7/14
  9. lonewolf020291

    lonewolf020291 T.E.T.Я.I.S

    Tham gia ngày:
    16/3/07
    Bài viết:
    579
    Nơi ở:
    Toy Box
    Nguyên nhân: Có thể nó di chuyển luôn là do: khi dummy đến sát target, kc < 100; sau khi move lần tiếp theo nó sẽ move vượt qua vị trí đó (setunitx, setunity thì ko có việc này được)
    Giải pháp: Bạn nên tính số lần tick (Khoảng cách/60) để di chuyển, mỗi lần unit chạy thì lấy tick = tick - 1 và về 0 thì turn off.
     
  10. Evil_Hunter

    Evil_Hunter Mario & Luigi

    Tham gia ngày:
    18/9/11
    Bài viết:
    786
    Nơi ở:
    Evil Forest
    ^ Tks nhiều, chả hiểu nút Rep bị gì mà + ko đc :D

    Nhân tiện cho mình hỏi: Làm thế nào để Hero khi học 1 skill nào đó, thì add cho nó cái 1 ability khác (Evasion chẳng hạn) nhưng ko hiện icon ability đó? Tuy nhiên tác dụng của ability add vào vẫn có tác dụng, mình làm thế này thì tác dụng nó chả thấy đâu.


    Mã:
    Enel E Learn
        Events
            Unit - A unit Learns a skill
        Conditions
            (Learned Hero Skill) Equal to Mantra 
        Actions
            Unit - Add Mantra(Unit-Evasion)  to (Learning Hero)
            Unit - Set level of Mantra  for (Learning Hero) to (Level of Mantra  for (Learning Hero))
            Player - Disable Mantra  for (Owner of (Learning Hero))
    Disbled thì nó sẽ mất icon, tuy nhiên cũng mất luôn tác dụng, vậy bạn nào biết cách khác phục ko? :(
     
    Chỉnh sửa cuối: 29/7/14
  11. lonewolf020291

    lonewolf020291 T.E.T.Я.I.S

    Tham gia ngày:
    16/3/07
    Bài viết:
    579
    Nơi ở:
    Toy Box
    Tạo một spell book từ item ability, add evasion này vào. Sau đó add và disable ability spell book khi hero học skill
     
  12. Evil_Hunter

    Evil_Hunter Mario & Luigi

    Tham gia ngày:
    18/9/11
    Bài viết:
    786
    Nơi ở:
    Evil Forest
    Ngon :D tks bạn
    À cái vụ skill loop kia, chả hiểu sao mình đã làm như bạn nói, nhưng nó vẫn như thế :|. Bạn xem giùm code có gì sai sót ko chứ mình chịu rồi =.=. Mò gần 1 ngày trời, đúng là bỏ we lâu giờ trình giảm sút rồi :(

    Mã:
    Ace E
        Events
            Unit - A unit Starts the effect of an ability
        Conditions
            (Ability being cast) Equal to Higan 
        Actions
            Set Ace_C[1] = (Casting unit)
            Set Ace_A[2] = (Facing of Ace_C[1])
            Set Ace_P[11] = (Position of Ace_C[1])
            Set Ace_P[12] = (Target point of ability being cast)
            Unit - Create 1 Dummy_Higan for (Owner of Ace_C[1]) at Ace_P[11] facing Ace_A[2] degrees
            Set Ace_D[1] = (Last created unit)
            Unit - Turn collision for Ace_D[1] Off
            Set Ace_T[1] = ((Distance between Ace_P[12] and Ace_P[11]) / 60.00)
            Custom script:   call RemoveLocation(udg_Ace_P[11])
            Trigger - Turn on Ace E Loop <gen>
    
    Mã:
    Ace E Loop
        Events
            Time - Every 0.06 seconds of game time
        Conditions
        Actions
            Set Ace_T[1] = (Ace_T[1] - 1.00)
            Set Ace_P[11] = (Position of Ace_D[1])
            Set Ace_P[13] = (Ace_P[11] offset by 60.00 towards Ace_A[2] degrees)
            Unit - Move Ace_D[1] instantly to Ace_P[13]
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    Or - Any (Conditions) are true
                        Conditions
                            Ace_T[1] Equal to 0.00
                            (Terrain pathing at Ace_P[13] of type Walkability is off) Equal to True
                Then - Actions
                    Trigger - Turn off (This trigger)
                    Unit - Remove Ace_D[1] from the game
                    Special Effect - Create a special effect at Ace_P[11] using FireStomp.mdx
                    Special Effect - Destroy (Last created special effect)
                    Special Effect - Create a special effect at Ace_P[11] using NewMassiveEX.mdx
                    Special Effect - Destroy (Last created special effect)
                    Special Effect - Create a special effect at Ace_P[11] using NewGroundEX.mdx
                    Special Effect - Destroy (Last created special effect)
                    Special Effect - Create a special effect at Ace_P[11] using A-Bomb.mdx
                    Special Effect - Destroy (Last created special effect)
                    Set Ace_G[3] = (Units within 600.00 of Ace_P[12] matching ((((Matching unit) belongs to an enemy of Player 11 (Dark Green)) Equal to True)
     and (((Matching unit) is alive) Equal to True)))
                    Unit Group - Pick every unit in Ace_G[3] and do (Actions)
                        Loop - Actions
                            Unit - Cause Ace_C[1] to damage (Picked unit), dealing ((Real((Level of Higan  for Ace_C[1]))) 
    x (Real((Agility of Ace_C[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire
                            Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
                            Special Effect - Destroy (Last created special effect)
                    Custom script:   call RemoveLocation(udg_Ace_P[11])
                    Custom script:   call RemoveLocation(udg_Ace_P[12])
                    Custom script:   call RemoveLocation(udg_Ace_P[13])
                    Custom script:   call DestroyGroup(udg_Ace_G[3])
                Else - Actions
            Custom script:   call RemoveLocation(udg_Ace_P[11])
            Custom script:   call RemoveLocation(udg_Ace_P[13])
    
    Dòng deal dmg với pick group dài quá, nó kéo page :|.Tớ cho nó xuống dòng, Cậu chịu khó đọc vậy.
     
    Chỉnh sửa cuối: 31/7/14
  13. Evil_Hunter

    Evil_Hunter Mario & Luigi

    Tham gia ngày:
    18/9/11
    Bài viết:
    786
    Nơi ở:
    Evil Forest
    Doublepost :|. Giờ diễn đàn này cũng vắng nhỉ, chả khác gì phutu :|
    Ai có cái system ghép đồ nào tiện mà dễ dùng share mình với. Ép khi full đồ và có thể nhập charge ý. Cái của 19101994 thật sự quá hợp ý mình nhưng hắn xóa mất rồi :(. Trong khi mình lục mấy cái map cũ, cũng có cái system này, mà là bản cũ, nên khi copy vào nó báo lỗi library gì đó =.=!
     
  14. lonewolf020291

    lonewolf020291 T.E.T.Я.I.S

    Tham gia ngày:
    16/3/07
    Bài viết:
    579
    Nơi ở:
    Toy Box
    Mã:
    Ace_T[1] Less than or equal to 0.00 or (Terrain pathing at Ace_P[13] of type Walkability is off) Equal to True
    Recipe Item System
     
  15. congminhmc

    congminhmc T.E.T.Я.I.S Lão Làng GVN

    Tham gia ngày:
    24/7/09
    Bài viết:
    550
    Tại hầu hết các fan war3 đã sang liên minh hết rồi bạn ak :( trước mình chơi trên garena có 1 đống người add fr rồi chơi đủ kiểu map như ice escape,green td,đủ các map,.. mà giờ đến 9/10 fr của mình sang hết liên minh rồi :( chán quá :(
    Nên box mới vắng vẻ như thế này bạn ak :(
     
  16. vuigame2014

    vuigame2014 Youtube Master Race GameOver

    Tham gia ngày:
    31/7/14
    Bài viết:
    20
    hỡi các game thủ game túy tiêu dao( thục sơn 2 ) sắp được phát rùi
     
  17. langthangbairac

    langthangbairac T.E.T.Я.I.S

    Tham gia ngày:
    19/5/12
    Bài viết:
    594
    Nơi ở:
    Thanh Chương
  18. nhanmanhdung

    nhanmanhdung Youtube Master Race

    Tham gia ngày:
    1/8/14
    Bài viết:
    6
    Em hỏi câu này xưa rồi nhưng chả ai trả lời hết :
    Làm thế nào để tạo unit phe địch từ 1 địa điểm xác định bằng region và nó di chuyển đến 1 địa điểm cũng xác định bằng region và tấn công bất cứ đối tượng địch nào nó gặp phải ?
     
  19. lethanhcong

    lethanhcong Youtube Master Race

    Tham gia ngày:
    13/7/03
    Bài viết:
    54
    Làm mua đồ từ xa được giống DotA, ở đầu game có cái nhà mua hero nhỉ mọi người :(
     
  20. DuyTuanvip

    DuyTuanvip Youtube Master Race

    Tham gia ngày:
    23/7/14
    Bài viết:
    13
    Mn hd m làm:
    1, bãi quái chết đi rồi hs lại giốg map rpg.
    2, một nv đgiản
    3, import hiệu ứng skill, Vd: Chiêu thức Vô ảnh cuoc thì nvat lấy chân sút...
    Tk truoc

    - - - Updated - - -

    cai nay don gian thoi ti m gui hd
     

Chia sẻ trang này